UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

24 lines 1.04 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Locations = void 0; const resource_1 = require("cloudflare/resource"); const core_1 = require("cloudflare/core"); class Locations extends resource_1.APIResource { list(query = {}, options) { if ((0, core_1.isRequestOptions)(query)) { return this.list({}, query); } return this._client.get('/radar/entities/locations', { query, ...options })._thenUnwrap((obj) => obj.result); } get(location, query = {}, options) { if ((0, core_1.isRequestOptions)(query)) { return this.get(location, {}, query); } return this._client.get(`/radar/entities/locations/${location}`, { query, ...options })._thenUnwrap((obj) => obj.result); } } exports.Locations = Locations; (function (Locations) { })(Locations = exports.Locations || (exports.Locations = {})); //# sourceMappingURL=locations.js.map