cloudflare
Version:
The official TypeScript library for the Cloudflare API
78 lines • 3.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Locations = exports.BaseLocations = void 0;
const tslib_1 = require("../../../../internal/tslib.js");
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../../core/resource.js");
const BotClassAPI = tslib_1.__importStar(require("./bot-class.js"));
const bot_class_1 = require("./bot-class.js");
const BrowserFamilyAPI = tslib_1.__importStar(require("./browser-family.js"));
const browser_family_1 = require("./browser-family.js");
const DeviceTypeAPI = tslib_1.__importStar(require("./device-type.js"));
const device_type_1 = require("./device-type.js");
const HTTPMethodAPI = tslib_1.__importStar(require("./http-method.js"));
const http_method_1 = require("./http-method.js");
const HTTPProtocolAPI = tslib_1.__importStar(require("./http-protocol.js"));
const http_protocol_1 = require("./http-protocol.js");
const IPVersionAPI = tslib_1.__importStar(require("./ip-version.js"));
const ip_version_1 = require("./ip-version.js");
const OSAPI = tslib_1.__importStar(require("./os.js"));
const os_1 = require("./os.js");
const TLSVersionAPI = tslib_1.__importStar(require("./tls-version.js"));
const tls_version_1 = require("./tls-version.js");
var BaseLocations = /* @__PURE__ */ (() => {
class BaseLocations extends resource_1.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;
})();
exports.BaseLocations = BaseLocations;
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 = bot_class_1.BotClass;
Locations.BaseBotClass = bot_class_1.BaseBotClass;
Locations.DeviceType = device_type_1.DeviceType;
Locations.BaseDeviceType = device_type_1.BaseDeviceType;
Locations.HTTPProtocol = http_protocol_1.HTTPProtocol;
Locations.BaseHTTPProtocol = http_protocol_1.BaseHTTPProtocol;
Locations.HTTPMethod = http_method_1.HTTPMethod;
Locations.BaseHTTPMethod = http_method_1.BaseHTTPMethod;
Locations.IPVersion = ip_version_1.IPVersion;
Locations.BaseIPVersion = ip_version_1.BaseIPVersion;
Locations.OS = os_1.OS;
Locations.BaseOS = os_1.BaseOS;
Locations.TLSVersion = tls_version_1.TLSVersion;
Locations.BaseTLSVersion = tls_version_1.BaseTLSVersion;
Locations.BrowserFamily = browser_family_1.BrowserFamily;
Locations.BaseBrowserFamily = browser_family_1.BaseBrowserFamily;
return Locations;
})();
exports.Locations = Locations;
//# sourceMappingURL=locations.js.map