UNPKG

@aiozstream/nodejs-client

Version:
208 lines (207 loc) 7.64 kB
/** * @aiozstream/nodejs-client * Aioz Stream Service * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated. * Do not edit the class manually. */ import HttpClient, { ApiResponseHeaders } from '../HttpClient'; import AddVideoToPlaylistRequest from '../model/AddVideoToPlaylistRequest'; import CreatePlaylistRequest from '../model/CreatePlaylistRequest'; import CreatePlaylistResponse from '../model/CreatePlaylistResponse'; import GetPlaylistByIdResponse from '../model/GetPlaylistByIdResponse'; import GetPlaylistListRequest from '../model/GetPlaylistListRequest'; import GetPlaylistListResponse from '../model/GetPlaylistListResponse'; import Metadata from '../model/Metadata'; import MoveVideoInPlaylistRequest from '../model/MoveVideoInPlaylistRequest'; import PublicPlaylistObject from '../model/PublicPlaylistObject'; import ResponseSuccess from '../model/ResponseSuccess'; import { Readable } from 'stream'; /** * no description */ export default class PlaylistApi { private httpClient; constructor(httpClient: HttpClient); /** * Add a specific video to a playlist for the authenticated user * Add a video to a playlist * @param id Playlist ID * @param payload Video details */ addVideoToPlaylist(id: string, payload?: AddVideoToPlaylistRequest): Promise<ResponseSuccess>; /** * Add a specific video to a playlist for the authenticated user * Add a video to a playlist * @param id Playlist ID * @param payload Video details */ addVideoToPlaylistWithResponseHeaders(id: string, payload?: AddVideoToPlaylistRequest): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess; }>; /** * Create a playlist for the authenticated user * Create a playlist * @param request Playlist input */ createPlaylist(request?: CreatePlaylistRequest): Promise<CreatePlaylistResponse>; /** * Create a playlist for the authenticated user * Create a playlist * @param request Playlist input */ createPlaylistWithResponseHeaders(request?: CreatePlaylistRequest): Promise<{ headers: ApiResponseHeaders; body: CreatePlaylistResponse; }>; /** * Delete a specific playlist by its ID for the authenticated user * Delete a playlist by ID * @param id Playlist ID */ deletePlaylistById(id: string): Promise<ResponseSuccess>; /** * Delete a specific playlist by its ID for the authenticated user * Delete a playlist by ID * @param id Playlist ID */ deletePlaylistByIdWithResponseHeaders(id: string): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess; }>; /** * Delete the thumbnail of a specific playlist for the authenticated user * Delete a playlist thumbnail * @param id Playlist ID */ deletePlaylistThumbnail(id: string): Promise<ResponseSuccess>; /** * Delete the thumbnail of a specific playlist for the authenticated user * Delete a playlist thumbnail * @param id Playlist ID */ deletePlaylistThumbnailWithResponseHeaders(id: string): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess; }>; /** * Retrieve a specific playlist by its ID for the current user. * Get playlist by ID * @param {Object} searchParams * @param { string } searchParams.id Playlist ID * @param { &#39;created_at&#39; | &#39;title&#39; | &#39;duration&#39; } searchParams.sortBy sort by * @param { &#39;asc&#39; | &#39;desc&#39; } searchParams.orderBy allowed: asc, desc. Default: asc */ getPlaylistById(args: { id: string; sortBy?: 'created_at' | 'title' | 'duration'; orderBy?: 'asc' | 'desc'; }): Promise<GetPlaylistByIdResponse>; /** * Retrieve a specific playlist by its ID for the current user. * Get playlist by ID * @param {Object} searchParams * @param { string } searchParams.id Playlist ID * @param { &#39;created_at&#39; | &#39;title&#39; | &#39;duration&#39; } searchParams.sortBy sort by * @param { &#39;asc&#39; | &#39;desc&#39; } searchParams.orderBy allowed: asc, desc. Default: asc */ getPlaylistByIdWithResponseHeaders({ id, sortBy, orderBy, }: { id: string; sortBy?: 'created_at' | 'title' | 'duration'; orderBy?: 'asc' | 'desc'; }): Promise<{ headers: ApiResponseHeaders; body: GetPlaylistByIdResponse; }>; /** * Get a specific playlist public by its ID * Get a playlist public * @param id Playlist ID */ getPlaylistPublicInfo(id: string): Promise<PublicPlaylistObject>; /** * Get a specific playlist public by its ID * Get a playlist public * @param id Playlist ID */ getPlaylistPublicInfoWithResponseHeaders(id: string): Promise<{ headers: ApiResponseHeaders; body: PublicPlaylistObject; }>; /** * Retrieve a list of playlists for the authenticated user * Get user's playlists * @param request Playlist filter */ getPlaylists(request?: GetPlaylistListRequest): Promise<GetPlaylistListResponse>; /** * Retrieve a list of playlists for the authenticated user * Get user's playlists * @param request Playlist filter */ getPlaylistsWithResponseHeaders(request?: GetPlaylistListRequest): Promise<{ headers: ApiResponseHeaders; body: GetPlaylistListResponse; }>; /** * Move a specific video in a playlist for the authenticated user * Move a video in a playlist * @param id Playlist ID * @param payload Video details */ moveVideoInPlaylist(id: string, payload?: MoveVideoInPlaylistRequest): Promise<ResponseSuccess>; /** * Move a specific video in a playlist for the authenticated user * Move a video in a playlist * @param id Playlist ID * @param payload Video details */ moveVideoInPlaylistWithResponseHeaders(id: string, payload?: MoveVideoInPlaylistRequest): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess; }>; /** * Remove a specific video from a playlist for the authenticated user * Remove a video from a playlist * @param id Playlist ID * @param itemId Playlist Item ID */ removeVideoFromPlaylist(id: string, itemId: string): Promise<ResponseSuccess>; /** * Remove a specific video from a playlist for the authenticated user * Remove a video from a playlist * @param id Playlist ID * @param itemId Playlist Item ID */ removeVideoFromPlaylistWithResponseHeaders(id: string, itemId: string): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess; }>; /** * Update a specific playlist for the authenticated user * Update a playlist * @param id Playlist ID * @param file * @param metadata * @param name * @param tags */ updatePlaylist(id: string, file: string | Readable | Buffer, metadata?: Array<Metadata>, name?: string, tags?: Array<string>): Promise<ResponseSuccess>; /** * Update a specific playlist for the authenticated user * Update a playlist * @param id Playlist ID * @param file * @param metadata * @param name * @param tags */ updatePlaylistWithResponseHeaders(id: string, file: string | Readable | Buffer, metadata?: Array<Metadata>, name?: string, tags?: Array<string>): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess; }>; }