UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

39 lines • 1.33 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import { buildHeaders } from "../../../../internal/headers.mjs"; import { path } from "../../../../internal/utils/path.mjs"; export var BaseVtt = /* @__PURE__ */ (() => { class BaseVtt extends APIResource { /** * Return WebVTT captions for a provided language. * * @example * ```ts * const vtt = await client.stream.captions.language.vtt.get( * 'tr', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * identifier: 'ea95132c15732412d22c1476fa83f27a', * }, * ); * ``` */ get(language, params, options) { const { account_id, identifier } = params; return this._client.get(path `/accounts/${account_id}/stream/${identifier}/captions/${language}/vtt`, { ...options, headers: buildHeaders([{ Accept: 'text/vtt' }, options?.headers]), }); } } BaseVtt._key = Object.freeze([ 'stream', 'captions', 'language', 'vtt', ]); return BaseVtt; })(); export class Vtt extends BaseVtt { } //# sourceMappingURL=vtt.mjs.map