Skip to main content

youtube.js

youtube#

Module to handle communication with YouTube APIs

youtube~isVideoURL(URL) ⇒ boolean#

Kind: inner method of youtube
Returns: boolean -

If the URL is a YouTube Video URL or not

ParamTypeDescription
URLstring

The URL you want to test

youtube~isPlaylistURL(URL) ⇒ boolean#

Kind: inner method of youtube
Returns: boolean -

If the URL is a YouTube Playlist URL or not

ParamTypeDescription
URLstring

The URL you want to test

youtube~getPlaylistId(URL) ⇒ string | null#

Kind: inner method of youtube
Returns: string | null -

The playlist id, if one could be found.

ParamTypeDescription
URLstring

The URL you want get the playlist ID from

youtube~getPlaylistItems(playlistId) ⇒ Array#

Get playlist items

Kind: inner method of youtube
Returns: Array -

Array of the playlist items

ParamTypeDescription
playlistIdstring

The ID of the YouTube playlist

youtube~searchByQuery(query) ⇒ Promise.<(string|null)>#

Searches for a track by the query provided

Kind: inner method of youtube
Returns: Promise.<(string|null)> -

The found tracks YouTube URL, if any.

ParamTypeDescription
querystring

The query you would like to search with