UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HTTPProtocol = exports.BaseHTTPProtocol = 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 BaseHTTPProtocol = /* @__PURE__ */ (() => { class BaseHTTPProtocol extends resource_1.APIResource { /** * Retrieves the top autonomous systems, by HTTP requests, of the requested HTTP * protocol. * * @example * ```ts * const httpProtocol = * await client.radar.http.ases.httpProtocol.get('HTTP'); * ``` */ get(httpProtocol, query = {}, options) { return this._client.get((0, path_1.path) `/radar/http/top/ases/http_protocol/${httpProtocol}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseHTTPProtocol._key = Object.freeze([ 'radar', 'http', 'ases', 'httpProtocol', ]); return BaseHTTPProtocol; })(); exports.BaseHTTPProtocol = BaseHTTPProtocol; class HTTPProtocol extends BaseHTTPProtocol { } exports.HTTPProtocol = HTTPProtocol; //# sourceMappingURL=http-protocol.js.map