UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.42 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import { path } from "../../../../internal/utils/path.mjs"; export var BaseUpstreams = /* @__PURE__ */ (() => { class BaseUpstreams extends 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(path `/radar/bgp/routes/upstreams/${asn}/timeseries`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseUpstreams._key = Object.freeze([ 'radar', 'bgp', 'routes', 'upstreams', ]); return BaseUpstreams; })(); export class Upstreams extends BaseUpstreams { } //# sourceMappingURL=upstreams.mjs.map