UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

79 lines • 2.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Top = exports.BaseTop = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseTop = /* @__PURE__ */ (() => { class BaseTop extends resource_1.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((0, path_1.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((0, path_1.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((0, path_1.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; })(); exports.BaseTop = BaseTop; class Top extends BaseTop { } exports.Top = Top; //# sourceMappingURL=top.js.map