cloudflare
Version:
The official TypeScript library for the Cloudflare API
32 lines • 1.36 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
export var BaseTop = /* @__PURE__ */ (() => {
class BaseTop extends APIResource {
/**
* Retrieves the top verified bots by HTTP requests, with owner and category.
*
* @deprecated Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead.
*/
bots(query = {}, options) {
return this._client.get('/radar/verified_bots/top/bots', { query, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Retrieves the top verified bot categories by HTTP requests, along with their
* corresponding percentage, over the total verified bot HTTP requests.
*
* @deprecated Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead.
*/
categories(query = {}, options) {
return this._client.get('/radar/verified_bots/top/categories', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseTop._key = Object.freeze([
'radar',
'verifiedBots',
'top',
]);
return BaseTop;
})();
export class Top extends BaseTop {
}
//# sourceMappingURL=top.mjs.map