UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines • 1.48 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 BasePaths = /* @__PURE__ */ (() => { class BasePaths extends APIResource { /** * Retrieves the paths an AS uses to reach the tier-1 clique, derived from * RouteViews RIB snapshots. Each entry is an ordered AS-path segment (from the * queried AS toward a tier-1) with the number of observed paths and peers, and the * collectors that observed it. By default segments are merged across all active * collectors; pass "collector" to scope to one. The response also includes an * "asnInfo" map (keyed by ASN) with the name and country for every ASN in the * returned segments plus the queried ASN (best-effort; null when unavailable). * * @example * ```ts * const paths = await client.radar.bgp.routes.paths.list(174); * ``` */ list(asn, query = {}, options) { return this._client.get(path `/radar/bgp/routes/paths/${asn}`, { query, ...options })._thenUnwrap((obj) => obj.result); } } BasePaths._key = Object.freeze([ 'radar', 'bgp', 'routes', 'paths', ]); return BasePaths; })(); export class Paths extends BasePaths { } //# sourceMappingURL=paths.mjs.map