UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.34 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import * as SubnetsAPI from "./subnets.mjs"; import { BaseSubnets, Subnets } from "./subnets.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseASN = /* @__PURE__ */ (() => { class BaseASN extends APIResource { /** * Gets an overview of the Autonomous System Number (ASN) and a list of subnets for * it. * * @example * ```ts * const asn = await client.intel.asn.get(0, { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(asn, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/intel/asn/${asn}`, options)._thenUnwrap((obj) => obj.result); } } BaseASN._key = Object.freeze(['intel', 'asn']); return BaseASN; })(); export var ASN = /* @__PURE__ */ (() => { class ASN extends BaseASN { constructor() { super(...arguments); this.subnets = new SubnetsAPI.Subnets(this._client); } } ASN.Subnets = Subnets; ASN.BaseSubnets = BaseSubnets; return ASN; })(); //# sourceMappingURL=asn.mjs.map