An Asynchronous promise based wrapper around the YouTube Data API.
MIT License
An Asynchronous promise based wrapper around the YouTube Data API.
Open terminal from the project folder execute the following command to install the package :
yarn add youtube-v3-api
--------OR--------
npm install youtube-v3-api
Sample code snippet :
const { YoutubeDataAPI } = require("youtube-v3-api")
const API_KEY = '<ENTER YOUR API KEY HERE>';
const api = new YoutubeDataAPI(API_KEY);
api.searchAll(API_KEY,"Node Js",25).then((data) => {
console.log(data);
},(err) => {
console.error(err);
})
Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.
searchAll(q: string, maxResults: number, args?: any): Promise<{}>
Returns a list of videos that match the API request parameters.
searchVideo(id: string, args?: any): Promise<{}>
Returns a collection of zero or more channel resources that match the request criteria.
searchChannel(id: string, args?: any): Promise<{}>
Returns a list of videos that match the API request parameters.
searchChannelSections(channelId: string, args?: any): Promise<{}>
Returns a list of comments that match the API request parameters.
searchComments(parentId: string, args?: any): Promise<{}>
Returns a list of comment threads that match the API request parameters.
searchCommentThreads(videoId: string, args?: any): Promise<{}>
Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.
searchPlaylist(channelId: string, maxResults: number, args?: any): Promise<{}>
Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.
searchPlaylistItems(playlistId: string, maxResults: number, args?: any): Promise<{}>
NOTE : Everything must Promise
d.