cloudflare
Version:
The official TypeScript library for the Cloudflare API
32 lines • 1.08 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 BaseIPVersion = /* @__PURE__ */ (() => {
class BaseIPVersion extends APIResource {
/**
* Retrieves the top locations, by HTTP requests, of the requested IP version.
*
* @example
* ```ts
* const ipVersion =
* await client.radar.http.locations.ipVersion.get('IPv4');
* ```
*/
get(ipVersion, query = {}, options) {
return this._client.get(path `/radar/http/top/locations/ip_version/${ipVersion}`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseIPVersion._key = Object.freeze([
'radar',
'http',
'locations',
'ipVersion',
]);
return BaseIPVersion;
})();
export class IPVersion extends BaseIPVersion {
}
//# sourceMappingURL=ip-version.mjs.map