cloudflare
Version:
The official TypeScript library for the Cloudflare API
31 lines • 1.07 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 BaseAccount = /* @__PURE__ */ (() => {
class BaseAccount extends APIResource {
/**
* Get the current DNS record usage and quota for an account. May include internal
* DNS usage and quota.
*
* @example
* ```ts
* const account = await client.dns.usage.account.get({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
get(params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/dns_records/usage`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseAccount._key = Object.freeze([
'dns',
'usage',
'account',
]);
return BaseAccount;
})();
export class Account extends BaseAccount {
}
//# sourceMappingURL=account.mjs.map