cloudflare
Version:
The official TypeScript library for the Cloudflare API
27 lines • 1.11 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
import * as BytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes';
export class Reports extends APIResource {
constructor() {
super(...arguments);
this.bytimes = new BytimesAPI.Bytimes(this._client);
}
/**
* Retrieves a list of summarised aggregate metrics over a given time period.
*
* See
* [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/)
* for detailed information about the available query parameters.
*/
get(dnsFirewallId, params, options) {
const { account_id, ...query } = params;
return this._client.get(`/accounts/${account_id}/dns_firewall/${dnsFirewallId}/dns_analytics/report`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
(function (Reports) {
Reports.Bytimes = BytimesAPI.Bytimes;
})(Reports || (Reports = {}));
//# sourceMappingURL=reports.mjs.map