cloudflare
Version:
The official TypeScript library for the Cloudflare API
53 lines • 2.19 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as DomainAPI from "./domain.mjs";
import { BaseDomain, Domain } from "./domain.mjs";
import * as InternetServicesAPI from "./internet-services.mjs";
import { BaseInternetServices, InternetServices, } from "./internet-services.mjs";
export var BaseRanking = /* @__PURE__ */ (() => {
class BaseRanking extends APIResource {
/**
* Retrieves domains rank over time.
*
* @example
* ```ts
* const response =
* await client.radar.ranking.timeseriesGroups();
* ```
*/
timeseriesGroups(query = {}, options) {
return this._client.get('/radar/ranking/timeseries_groups', { query, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Retrieves the top or trending domains based on their rank. Popular domains are
* domains of broad appeal based on how people use the Internet. Trending domains
* are domains that are generating a surge in interest. For more information on top
* domains, see https://blog.cloudflare.com/radar-domain-rankings/.
*
* @example
* ```ts
* const response = await client.radar.ranking.top();
* ```
*/
top(query = {}, options) {
return this._client.get('/radar/ranking/top', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseRanking._key = Object.freeze(['radar', 'ranking']);
return BaseRanking;
})();
export var Ranking = /* @__PURE__ */ (() => {
class Ranking extends BaseRanking {
constructor() {
super(...arguments);
this.domain = new DomainAPI.Domain(this._client);
this.internetServices = new InternetServicesAPI.InternetServices(this._client);
}
}
Ranking.Domain = Domain;
Ranking.BaseDomain = BaseDomain;
Ranking.InternetServices = InternetServices;
Ranking.BaseInternetServices = BaseInternetServices;
return Ranking;
})();
//# sourceMappingURL=ranking.mjs.map