UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

41 lines • 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Upstreams = exports.BaseUpstreams = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const path_1 = require("../../../../internal/utils/path.js"); var BaseUpstreams = /* @__PURE__ */ (() => { class BaseUpstreams extends resource_1.APIResource { /** * Retrieves the share of an AS’s observed paths carried by each direct upstream * over time, derived from RouteViews RIB snapshots across all collectors (the * combined product). Each upstream ASN is returned as its own series of shares * (0–1); the least-significant upstreams beyond the requested limit are grouped * into an "OTHER" series. Series share a common set of timestamps. * * @example * ```ts * const response = * await client.radar.bgp.routes.upstreams.timeseries(174); * ``` */ timeseries(asn, query = {}, options) { return this._client.get((0, path_1.path) `/radar/bgp/routes/upstreams/${asn}/timeseries`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseUpstreams._key = Object.freeze([ 'radar', 'bgp', 'routes', 'upstreams', ]); return BaseUpstreams; })(); exports.BaseUpstreams = BaseUpstreams; class Upstreams extends BaseUpstreams { } exports.Upstreams = Upstreams; //# sourceMappingURL=upstreams.js.map