UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

39 lines • 1.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Paths = exports.BasePaths = 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 BasePaths = /* @__PURE__ */ (() => { class BasePaths extends resource_1.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((0, path_1.path) `/radar/bgp/routes/paths/${asn}`, { query, ...options })._thenUnwrap((obj) => obj.result); } } BasePaths._key = Object.freeze([ 'radar', 'bgp', 'routes', 'paths', ]); return BasePaths; })(); exports.BasePaths = BasePaths; class Paths extends BasePaths { } exports.Paths = Paths; //# sourceMappingURL=paths.js.map