Skip to main content

OAuthVideos

popyt


popyt / OAuth / OAuthVideos

Class: OAuthVideos

Defined in: oauth/videos.ts:10

Constructors​

Constructor​

new OAuthVideos(oauth, request, upload): OAuthVideos

Defined in: oauth/videos.ts:14

Parameters​

oauth​

OAuth

request​

Request

upload​

Request

Returns​

OAuthVideos

Properties​

oauth​

oauth: OAuth

Defined in: oauth/videos.ts:14

Methods​

deleteVideo()​

deleteVideo(videoResolvable): Promise<void>

Defined in: oauth/videos.ts:122

Deletes a Video.

Parameters​

videoResolvable​

VideoResolvable

The video to delete.

Returns​

Promise<void>


getMyRatings()​

getMyRatings<T>(videoResolvable): Promise<T extends any[] ? VideoRating[] : VideoRating>

Defined in: oauth/videos.ts:39

Retrieve your rating on Videos.

Type Parameters​

T​

T extends VideoResolvable | VideoResolvable[]

Parameters​

videoResolvable​

T

The video(s) to retrieve your rating from.

Returns​

Promise<T extends any[] ? VideoRating[] : VideoRating>


getVideoAbuseReportReasons()​

getVideoAbuseReportReasons(): Promise<VideoAbuseReportReason[]>

Defined in: oauth/videos.ts:194

Gets a list of VideoAbuseReportReasons.

Returns​

Promise<VideoAbuseReportReason[]>


rateVideo()​

rateVideo(videoResolvable, rating): Promise<void>

Defined in: oauth/videos.ts:24

Like, dislike, or remove a rating from a Video.

Parameters​

videoResolvable​

VideoResolvable

The video to rate.

rating​

"none" | "like" | "dislike"

The rating to give the video.

Returns​

Promise<void>


reportAbuse()​

reportAbuse(videoResolvable, reasonId, secondaryReasonId?, comments?, language?): Promise<void>

Defined in: oauth/videos.ts:93

Report a Video for abuse.

Parameters​

videoResolvable​

VideoResolvable

The video to report.

reasonId​

string

The reason for reporting. (IDs can be found here)

secondaryReasonId?​

string

An optional second reason for reporting.

comments?​

string

Any additional information.

language?​

string

The language that the reporter speaks.

Returns​

Promise<void>


setThumbnail()​

setThumbnail(videoResolvable, image): Promise<{ default?: Thumbnail; high?: Thumbnail; maxres?: Thumbnail; medium?: Thumbnail; standard?: Thumbnail; }>

Defined in: oauth/videos.ts:178

Sets a new Thumbnail for a Video.

Parameters​

videoResolvable​

VideoResolvable

The video to set the thumbnail for.

image​

Image

The image data and type to upload.

Returns​

Promise<{ default?: Thumbnail; high?: Thumbnail; maxres?: Thumbnail; medium?: Thumbnail; standard?: Thumbnail; }>


updateVideo()​

updateVideo(video): Promise<Video>

Defined in: oauth/videos.ts:138

Updates a Video.
If your request does not specify a value for a property that already has a value, the property's existing value will be deleted.

Parameters​

video​

VideoUpdateResource

The updated video object.

Returns​

Promise<Video>