UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

57 lines • 2.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Speed = exports.BaseSpeed = void 0; const tslib_1 = require("../../../../internal/tslib.js"); // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const TopAPI = tslib_1.__importStar(require("./top.js")); const top_1 = require("./top.js"); var BaseSpeed = /* @__PURE__ */ (() => { class BaseSpeed extends resource_1.APIResource { /** * Retrieves a histogram from the previous 90 days of Cloudflare Speed Test data, * split into fixed bandwidth (Mbps), latency (ms), or jitter (ms) buckets. * * @example * ```ts * const response = * await client.radar.quality.speed.histogram(); * ``` */ histogram(query = {}, options) { return this._client.get('/radar/quality/speed/histogram', { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves a summary of bandwidth, latency, jitter, and packet loss, from the * previous 90 days of Cloudflare Speed Test data. * * @example * ```ts * const response = await client.radar.quality.speed.summary(); * ``` */ summary(query = {}, options) { return this._client.get('/radar/quality/speed/summary', { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseSpeed._key = Object.freeze([ 'radar', 'quality', 'speed', ]); return BaseSpeed; })(); exports.BaseSpeed = BaseSpeed; var Speed = /* @__PURE__ */ (() => { class Speed extends BaseSpeed { constructor() { super(...arguments); this.top = new TopAPI.Top(this._client); } } Speed.Top = top_1.Top; Speed.BaseTop = top_1.BaseTop; return Speed; })(); exports.Speed = Speed; //# sourceMappingURL=speed.js.map