cloudflare
Version:
The official TypeScript library for the Cloudflare API
29 lines • 1.12 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 BaseClip = /* @__PURE__ */ (() => {
class BaseClip extends APIResource {
/**
* Clips a video based on the specified start and end times provided in seconds.
*
* @example
* ```ts
* const video = await client.stream.clip.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* clippedFromVideoUID: '023e105f4ecef8ad9ca31a8372d0c353',
* endTimeSeconds: 0,
* startTimeSeconds: 0,
* });
* ```
*/
create(params, options) {
const { account_id, ...body } = params;
return this._client.post(path `/accounts/${account_id}/stream/clip`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseClip._key = Object.freeze(['stream', 'clip']);
return BaseClip;
})();
export class Clip extends BaseClip {
}
//# sourceMappingURL=clip.mjs.map