cloudflare
Version:
The official TypeScript library for the Cloudflare API
72 lines • 3.13 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../../core/resource.mjs";
import * as BotClassAPI from "./bot-class.mjs";
import { BaseBotClass, BotClass } from "./bot-class.mjs";
import * as BrowserFamilyAPI from "./browser-family.mjs";
import { BaseBrowserFamily, BrowserFamily, } from "./browser-family.mjs";
import * as DeviceTypeAPI from "./device-type.mjs";
import { BaseDeviceType, DeviceType } from "./device-type.mjs";
import * as HTTPMethodAPI from "./http-method.mjs";
import { BaseHTTPMethod, HTTPMethod } from "./http-method.mjs";
import * as HTTPProtocolAPI from "./http-protocol.mjs";
import { BaseHTTPProtocol, HTTPProtocol, } from "./http-protocol.mjs";
import * as IPVersionAPI from "./ip-version.mjs";
import { BaseIPVersion, IPVersion } from "./ip-version.mjs";
import * as OSAPI from "./os.mjs";
import { BaseOS, OS } from "./os.mjs";
import * as TLSVersionAPI from "./tls-version.mjs";
import { BaseTLSVersion, TLSVersion } from "./tls-version.mjs";
export var BaseLocations = /* @__PURE__ */ (() => {
class BaseLocations extends APIResource {
/**
* Retrieves the top locations by HTTP requests.
*
* @example
* ```ts
* const location = await client.radar.http.locations.get();
* ```
*/
get(query = {}, options) {
return this._client.get('/radar/http/top/locations', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseLocations._key = Object.freeze([
'radar',
'http',
'locations',
]);
return BaseLocations;
})();
export var Locations = /* @__PURE__ */ (() => {
class Locations extends BaseLocations {
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);
this.browserFamily = new BrowserFamilyAPI.BrowserFamily(this._client);
}
}
Locations.BotClass = BotClass;
Locations.BaseBotClass = BaseBotClass;
Locations.DeviceType = DeviceType;
Locations.BaseDeviceType = BaseDeviceType;
Locations.HTTPProtocol = HTTPProtocol;
Locations.BaseHTTPProtocol = BaseHTTPProtocol;
Locations.HTTPMethod = HTTPMethod;
Locations.BaseHTTPMethod = BaseHTTPMethod;
Locations.IPVersion = IPVersion;
Locations.BaseIPVersion = BaseIPVersion;
Locations.OS = OS;
Locations.BaseOS = BaseOS;
Locations.TLSVersion = TLSVersion;
Locations.BaseTLSVersion = BaseTLSVersion;
Locations.BrowserFamily = BrowserFamily;
Locations.BaseBrowserFamily = BaseBrowserFamily;
return Locations;
})();
//# sourceMappingURL=locations.mjs.map