UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

74 lines • 2.47 kB
// 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 BaseTop = /* @__PURE__ */ (() => { class BaseTop extends APIResource { /** * Retrieves the top locations of DNS queries to AS112 with DNSSEC (DNS Security * Extensions) support. * * @example * ```ts * const response = await client.radar.as112.top.dnssec( * 'SUPPORTED', * ); * ``` */ dnssec(dnssec, query = {}, options) { return this._client.get(path `/radar/as112/top/locations/dnssec/${dnssec}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } /** * Retrieves the top locations of DNS queries to AS112 with EDNS (Extension * Mechanisms for DNS) support. * * @example * ```ts * const response = await client.radar.as112.top.edns( * 'SUPPORTED', * ); * ``` */ edns(edns, query = {}, options) { return this._client.get(path `/radar/as112/top/locations/edns/${edns}`, { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the top locations of DNS queries to AS112 for an IP version. * * @example * ```ts * const response = await client.radar.as112.top.ipVersion( * 'IPv4', * ); * ``` */ ipVersion(ipVersion, query = {}, options) { return this._client.get(path `/radar/as112/top/locations/ip_version/${ipVersion}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } /** * Retrieves the top locations by AS112 DNS queries. * * @example * ```ts * const response = await client.radar.as112.top.locations(); * ``` */ locations(query = {}, options) { return this._client.get('/radar/as112/top/locations', { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseTop._key = Object.freeze([ 'radar', 'as112', 'top', ]); return BaseTop; })(); export class Top extends BaseTop { } //# sourceMappingURL=top.mjs.map