UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

44 lines • 1.44 kB
// 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 BaseApps = /* @__PURE__ */ (() => { class BaseApps extends APIResource { /** * Fetch all apps for your account * * @example * ```ts * const app = await client.realtimeKit.apps.get({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(params, options) { const { account_id, ...query } = params; return this._client.get(path `/accounts/${account_id}/realtime/kit/apps`, { query, ...options }); } /** * Create new app for your account * * @example * ```ts * const response = await client.realtimeKit.apps.post({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * name: 'x', * }); * ``` */ post(params, options) { const { account_id, ...body } = params; return this._client.post(path `/accounts/${account_id}/realtime/kit/apps`, { body, ...options }); } } BaseApps._key = Object.freeze([ 'realtimeKit', 'apps', ]); return BaseApps; })(); export class Apps extends BaseApps { } //# sourceMappingURL=apps.mjs.map