deno.land / x / gesso@v0.1.2 / src / Services.ts
12345678910111213141516171819202122232425262728293031323334import { BaseApi } from "./BaseApi.ts";import { Configuration } from "./Configuration.ts";import { Scope } from "../types/models.ts";
export class Services extends BaseApi { constructor(config: Configuration) { super(config); }
public async getKalturaConfig(body?: unknown): Promise<Scope> { const endpoint = "/api/v1/services/kaltura"; const url = new URL(endpoint, this.configuration.domain);
const response = await this.get(url, JSON.stringify(body)); if (response.ok) { return await response.json() as Scope; }
return Promise.reject(response); }
public async startKalturaSession(body?: unknown): Promise<Scope> { const endpoint = "/api/v1/services/kaltura_session"; const url = new URL(endpoint, this.configuration.domain);
const response = await this.post(url, JSON.stringify(body)); if (response.ok) { return await response.json() as Scope; }
return Promise.reject(response); }}
Version Info