/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { channelsDeleteChannelsChannelHashedId } from "../funcs/channelsDeleteChannelsChannelHashedId.js"; import { channelsGet } from "../funcs/channelsGet.js"; import { channelsList } from "../funcs/channelsList.js"; import { channelsPostChannels } from "../funcs/channelsPostChannels.js"; import { channelsPutChannelsChannelHashedId } from "../funcs/channelsPutChannelsChannelHashedId.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { ChannelsChannelEpisodes } from "./channelschannelepisodes.js"; export class Channels extends ClientSDK { private _channelEpisodes?: ChannelsChannelEpisodes; get channelEpisodes(): ChannelsChannelEpisodes { return (this._channelEpisodes ??= new ChannelsChannelEpisodes( this._options, )); } /** * List Channels * * @remarks * Lists all Channels belonging to an account. This endpoint can also be used to * do a batch fetch based off of the hashed id. * * ## Requires api token with one of the following permissions * ``` * Read all folder and media data * ``` */ async list( request?: operations.GetChannelsRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapAsync(channelsList( this, request, options, )); } /** * Create Channel * * @remarks * Creates a channel. */ async postChannels( request?: operations.PostChannelsRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(channelsPostChannels( this, request, options, )); } /** * Show Channel * * @remarks * Returns the Channel associated with the hashedId. * * ## Requires api token with one of the following permissions * ``` * Read all folder and media data * ``` */ async get( request: operations.GetChannelsChannelHashedIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(channelsGet( this, request, options, )); } /** * Update Channel * * @remarks * Updates a channel. */ async putChannelsChannelHashedId( request: operations.PutChannelsChannelHashedIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(channelsPutChannelsChannelHashedId( this, request, options, )); } /** * Delete Channel * * @remarks * Deletes a channel. */ async deleteChannelsChannelHashedId( request: operations.DeleteChannelsChannelHashedIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(channelsDeleteChannelsChannelHashedId( this, request, options, )); } }