UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines 2.04 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; import * as BotClassAPI from 'cloudflare/resources/radar/http/locations/bot-class'; import * as DeviceTypeAPI from 'cloudflare/resources/radar/http/locations/device-type'; import * as HTTPMethodAPI from 'cloudflare/resources/radar/http/locations/http-method'; import * as HTTPProtocolAPI from 'cloudflare/resources/radar/http/locations/http-protocol'; import * as IPVersionAPI from 'cloudflare/resources/radar/http/locations/ip-version'; import * as OSAPI from 'cloudflare/resources/radar/http/locations/os'; import * as TLSVersionAPI from 'cloudflare/resources/radar/http/locations/tls-version'; export class Locations extends APIResource { constructor() { super(...arguments); this.botClass = new BotClassAPI.BotClass(this._client); this.deviceType = new DeviceTypeAPI.DeviceType(this._client); this.httpProtocol = new HTTPProtocolAPI.HTTPProtocol(this._client); this.httpMethod = new HTTPMethodAPI.HTTPMethod(this._client); this.ipVersion = new IPVersionAPI.IPVersion(this._client); this.os = new OSAPI.OS(this._client); this.tlsVersion = new TLSVersionAPI.TLSVersion(this._client); } get(query = {}, options) { if (isRequestOptions(query)) { return this.get({}, query); } return this._client.get('/radar/http/top/locations', { query, ...options })._thenUnwrap((obj) => obj.result); } } (function (Locations) { Locations.BotClass = BotClassAPI.BotClass; Locations.DeviceType = DeviceTypeAPI.DeviceType; Locations.HTTPProtocol = HTTPProtocolAPI.HTTPProtocol; Locations.HTTPMethod = HTTPMethodAPI.HTTPMethod; Locations.IPVersion = IPVersionAPI.IPVersion; Locations.OS = OSAPI.OS; Locations.TLSVersion = TLSVersionAPI.TLSVersion; })(Locations || (Locations = {})); //# sourceMappingURL=locations.mjs.map