UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

51 lines • 1.77 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import * as TopAPI from "./top.mjs"; import { BaseTop, Top, } from "./top.mjs"; export var BaseSpeed = /* @__PURE__ */ (() => { class BaseSpeed extends 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; })(); export var Speed = /* @__PURE__ */ (() => { class Speed extends BaseSpeed { constructor() { super(...arguments); this.top = new TopAPI.Top(this._client); } } Speed.Top = Top; Speed.BaseTop = BaseTop; return Speed; })(); //# sourceMappingURL=speed.mjs.map