cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.11 kB
JavaScript
// 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 BaseBotClass = /* @__PURE__ */ (() => {
class BaseBotClass extends APIResource {
/**
* Retrieves the top locations, by HTTP requests, of the requested bot class.
*
* @example
* ```ts
* const botClass =
* await client.radar.http.locations.botClass.get(
* 'LIKELY_AUTOMATED',
* );
* ```
*/
get(botClass, query = {}, options) {
return this._client.get(path `/radar/http/top/locations/bot_class/${botClass}`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseBotClass._key = Object.freeze([
'radar',
'http',
'locations',
'botClass',
]);
return BaseBotClass;
})();
export class BotClass extends BaseBotClass {
}
//# sourceMappingURL=bot-class.mjs.map