cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 lines • 1.49 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../resource.mjs";
import { isRequestOptions } from "../../../core.mjs";
export class TimeseriesGroups extends APIResource {
summary(dimension, query = {}, options) {
if (isRequestOptions(query)) {
return this.summary(dimension, {}, query);
}
return this._client.get(`/radar/ai/bots/summary/${dimension}`, { query, ...options })._thenUnwrap((obj) => obj.result);
}
timeseries(query = {}, options) {
if (isRequestOptions(query)) {
return this.timeseries({}, query);
}
return this._client.get('/radar/ai/bots/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result);
}
timeseriesGroups(dimension, query = {}, options) {
if (isRequestOptions(query)) {
return this.timeseriesGroups(dimension, {}, query);
}
return this._client.get(`/radar/ai/bots/timeseries_groups/${dimension}`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
userAgent(query = {}, options) {
if (isRequestOptions(query)) {
return this.userAgent({}, query);
}
return this._client.get('/radar/ai/bots/timeseries_groups/user_agent', {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
//# sourceMappingURL=timeseries-groups.mjs.map