/** * @module OAuth */ import { Request } from '../util'; import OAuth from '../oauth'; import * as YT from '..'; export declare class OAuthCaptions { #private; oauth: OAuth; constructor(oauth: OAuth, request: Request, upload: Request); /** * Get a [Caption](../../Library-Exports/classes/Caption#) object * from the URL, ID, or search query of its video and the ID of the caption. * @param videoResolvable The Title, URL, or ID of the video to get the caption from. * @param captionId The ID of the caption. */ getCaption(videoResolvable: YT.VideoResolvable, captionId: string): Promise; /** * Gets the [Caption](../../Library-Exports/classes/Caption#)s of a [Video](../../Library-Exports/classes/Video#). Used mostly internally with [Video.fetchCaptions](../../Library-Exports/classes/Video#fetchcaptions). * @param videoResolvable The Title, URL, or ID of the video to get the captions from. */ getCaptions(videoResolvable: YT.VideoResolvable): Promise; /** * Uploads a [Caption](../../Library-Exports/classes/Caption#) track for a [Video](../../Library-Exports/classes/Video#). * @param videoResolvable The video to add the caption track to. * @param language The language that the caption track is in. * @param name The name of the caption track. * @param track The caption track to upload. * @param draft Whether or not the caption track is a draft. If it is, it isn't visible to users. */ uploadCaption(videoResolvable: YT.VideoResolvable, language: string, name: string, track: Buffer, draft?: boolean): Promise; /** * Edits a [Caption](../../Library-Exports/classes/Caption#) track. * **If your request does not specify a value for a property that already has a value, * the property's existing value will be deleted.** * @param id The ID of the caption track to edit. * @param track The caption track to upload. * @param draft Whether or not the caption track is a draft. If it is, it isn't visible to users. */ updateCaption(id: string, track?: Buffer, draft?: boolean): Promise; /** * Downloads a [Caption](../../Library-Exports/classes/Caption#) track. * @param id The ID of the caption track to download. * @param format The file format to download the track in. * @param language The language to download the track in. */ downloadCaption(id: string, format?: 'sbv' | 'scc' | 'srt' | 'ttml' | 'vtt', language?: string): Promise; /** * Deletes a [Caption](../../Library-Exports/classes/Caption#) track. * @param id The ID of the caption track to delete. */ deleteCaption(id: string): Promise; }