cloudflare
Version:
The official TypeScript library for the Cloudflare API
39 lines • 1.34 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeviceType = exports.BaseDeviceType = 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 BaseDeviceType = /* @__PURE__ */ (() => {
class BaseDeviceType extends resource_1.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((0, path_1.path) `/radar/http/top/locations/device_type/${deviceType}`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseDeviceType._key = Object.freeze([
'radar',
'http',
'locations',
'deviceType',
]);
return BaseDeviceType;
})();
exports.BaseDeviceType = BaseDeviceType;
class DeviceType extends BaseDeviceType {
}
exports.DeviceType = DeviceType;
//# sourceMappingURL=device-type.js.map