youtube-api

A Node.JS module, which provides an object oriented wrapper for the Youtube v3 API.

npm install youtube-api
4 downloads in the last day
49 downloads in the last week
286 downloads in the last month

Youtube API

A Node.JS module, which provides an object oriented wrapper for the Youtube v3 API.

NPM

Help the youtube-api NPM package development. Any donation is welcome and I will be thankful!

Installation

Install with the Node.JS package manager npm:

$ npm install youtube-api

or

Install via git clone:

$ git clone git://github.com/IonicaBizau/youtube-api.git
$ cd youtube-api
$ npm install

Documentation

You can find the docs for the API of this client at http://ionicabizau.github.io/youtube-api/

Additionally, the official Youtube documentation is a very useful resource.

Resource Type
Supported Operations
list insert update delete
activity yes yes no no
channel yes no no no
guideCategory yes no no no
playlist yes yes yes yes
playlistItem yes yes yes yes
search result yes no no no
subscription yes no no no
video yes yes yes yes
videoCategory yes no no no

Example

var Youtube = require("youtube-api");

Youtube.authenticate({
    type: "oauth",
    token: ACCESS_TOKEN
});

Youtube.channels.list({
    "part": "id",
    "mySubscribers": true,
    "maxResults": 50
}, function (err, data) {
    console.log(err, data);
});

Authentication

Youtube.authenticate({
    type: "oauth",
    token: "your access token"
});

Implemented Youtube APIs

All APIs that don't require POST, PUT or DELETE request methods are supported. More features will be added in the next versions.

Running the Tests

Download and test this module using this test application.

Note that a connection to the internet is required to run the tests.

Contributors

See package.json file.

LICENSE

MIT license. See the LICENSE file for details.

Changelog

v0.2.2

  • Removed debugging message from index.js
  • Output an error in application logs if there is an unkwnown error in request
  • Minor fix in util.js

v0.2.1

v0.2.0

  • Added the key authentication.

    Example:

     Youtube.authenticate({
         type: 'key',
         key: 'AIz...OtE'
     });
    

v0.1.1

  • Fixed #2 (pull request): fix in videos API requests.

v0.1.0

  • Initial release
  • Supports only GET requests
npm loves you