UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

29 lines • 1.25 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 BaseNetworkPath = /* @__PURE__ */ (() => { class BaseNetworkPath extends APIResource { /** * Get a breakdown of hops and performance metrics for a specific traceroute test * run * * @example * ```ts * const networkPath = * await client.zeroTrust.dex.tracerouteTestResults.networkPath.get( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '01a7362d577a6c3019a474fd6f485823' }, * ); * ``` */ get(testResultID, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/dex/traceroute-test-results/${testResultID}/network-path`, options)._thenUnwrap((obj) => obj.result); } } BaseNetworkPath._key = Object.freeze(['zeroTrust', 'dex', 'tracerouteTestResults', 'networkPath']); return BaseNetworkPath; })(); export class NetworkPath extends BaseNetworkPath { } //# sourceMappingURL=network-path.mjs.map