UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines • 1.13 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 BaseDeviceType = /* @__PURE__ */ (() => { class BaseDeviceType extends APIResource { /** * Retrieves the top locations, by HTTP requests, of the requested device type. * * @example * ```ts * const deviceType = * await client.radar.http.locations.deviceType.get( * 'DESKTOP', * ); * ``` */ get(deviceType, query = {}, options) { return this._client.get(path `/radar/http/top/locations/device_type/${deviceType}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseDeviceType._key = Object.freeze([ 'radar', 'http', 'locations', 'deviceType', ]); return BaseDeviceType; })(); export class DeviceType extends BaseDeviceType { } //# sourceMappingURL=device-type.mjs.map