cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 lines • 1.38 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 BaseAnalytics = /* @__PURE__ */ (() => {
class BaseAnalytics extends APIResource {
/**
* Returns day-wise session and recording analytics data of an App for the
* specified time range start_date to end_date. If start_date and end_date are not
* provided, the default time range is set from 30 days ago to the current date.
*
* @example
* ```ts
* const response =
* await client.realtimeKit.analytics.getOrgAnalytics(
* '14a396e7-ca44-4937-bf1f-050a69118543',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
getOrgAnalytics(appID, params, options) {
const { account_id, ...query } = params;
return this._client.get(path `/accounts/${account_id}/realtime/kit/${appID}/analytics/daywise`, {
query,
...options,
});
}
}
BaseAnalytics._key = Object.freeze([
'realtimeKit',
'analytics',
]);
return BaseAnalytics;
})();
export class Analytics extends BaseAnalytics {
}
//# sourceMappingURL=analytics.mjs.map