cloudflare
Version:
The official TypeScript library for the Cloudflare API
35 lines • 1.41 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 BaseASN = /* @__PURE__ */ (() => {
class BaseASN extends APIResource {
/**
* Gets all the data the botnet tracking database has for a given ASN registered to
* user account for given date. If no date is given, it will return results for the
* previous day.
*/
dayReport(asnID, params, options) {
const { account_id, ...query } = params;
return this._client.get(path `/accounts/${account_id}/botnet_feed/asn/${asnID}/day_report`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Gets all the data the botnet threat feed tracking database has for a given ASN
* registered to user account.
*/
fullReport(asnID, params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/botnet_feed/asn/${asnID}/full_report`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseASN._key = Object.freeze([
'botnetFeed',
'asn',
]);
return BaseASN;
})();
export class ASN extends BaseASN {
}
//# sourceMappingURL=asn.mjs.map