cloudflare
Version:
The official TypeScript library for the Cloudflare API
37 lines • 1.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Top = exports.BaseTop = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
var BaseTop = /* @__PURE__ */ (() => {
class BaseTop extends resource_1.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;
})();
exports.BaseTop = BaseTop;
class Top extends BaseTop {
}
exports.Top = Top;
//# sourceMappingURL=top.js.map