5.1.2 • Published 5 years ago

dieyne-youtube-api v5.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Simple YouTube API

This library is designed to greatly simplify interacting with the basic functions of the YouTube API. It deals with viewing/searching videos, playlists, and channels.

Installation

$ npm install dieyne-youtube-api

Usage

  • Documentation This repository is clone from simple-youtube-api, i have cutom search function now it return an objet not an array of videos

Important note: the part query parameter

If you fetch a YouTube resource and it's missing information you expect to be present, it's very likely that you haven't sent the correct part query parameter to YouTube. This library has some default parts in order to give some basic information about each resource, but you should always verify your part queries if you require more/different information. Parts are available in detail on the Google Developers API documentation pages for each YouTube resource: for example, these are the available parts when fetching videos. Parts should be comma-separated.

Parts can be sent in the request options when fetching resources. For example:

const video = await youtube.getVideo('https://www.youtube.com/watch?v=dQw4w9WgXcQ', { part: 'statistics,status' })

Please see #28 for more information or to comment on this issue.