cloudflare
Version:
The official TypeScript library for the Cloudflare API
29 lines • 1.25 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as RoutesAPI from 'cloudflare/resources/radar/bgp/routes';
import * as HijacksAPI from 'cloudflare/resources/radar/bgp/hijacks/hijacks';
import * as LeaksAPI from 'cloudflare/resources/radar/bgp/leaks/leaks';
import * as TopAPI from 'cloudflare/resources/radar/bgp/top/top';
export class BGP extends APIResource {
constructor() {
super(...arguments);
this.leaks = new LeaksAPI.Leaks(this._client);
this.top = new TopAPI.Top(this._client);
this.hijacks = new HijacksAPI.Hijacks(this._client);
this.routes = new RoutesAPI.Routes(this._client);
}
timeseries(query = {}, options) {
if (isRequestOptions(query)) {
return this.timeseries({}, query);
}
return this._client.get('/radar/bgp/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
(function (BGP) {
BGP.Leaks = LeaksAPI.Leaks;
BGP.Top = TopAPI.Top;
BGP.Hijacks = HijacksAPI.Hijacks;
BGP.Routes = RoutesAPI.Routes;
})(BGP || (BGP = {}));
//# sourceMappingURL=bgp.mjs.map