Youtube API
A Node.JS module, which provides an object oriented wrapper for the Youtube v3 API.
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.1.1
- Fixed #2 (pull request): fix in
videos
API requests.
v0.1.0
- Initial release
- Supports only
GET
requests