Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

youtube-api

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-api

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

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by8.19%
Maintainers
1
Weekly downloads
 
Created
Source

Youtube API

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

NPM

Installation

Install with the Node.JS package manager npm:

$ npm install youtube-api

or

Install via git:

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

Documentation

The official Youtube documentation is a very useful resource.

If you have any questions, just open an issue.

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

OAuth

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

Server Key

Youtube.authenticate({
    type: "key"
  , key: "your server key"
});

JWT

Youtube.authenticate({
    type: "jwt"
  , email: "77....3vv@developer.gserviceaccount.com"
  , keyFile: "... auth.pem"
  , key: "fb....d50"
  , subject: "you@gmail.com" // optional
  , scopes: ["https://www.googleapis.com/auth/youtube"]
}).authorize(function (err, data) {
    if (err) { throw err; }
    /* Access resources */
});

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.

Donate

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

LICENSE

MIT license. See the LICENSE file for details.

Changelog

v0.3.1

  • Fixes in documentation

v0.3.0

  • JWT authentication type
  • All request types are supported (using googleapis)
  • Deprecacted setConfig method

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

Keywords

FAQs

Package last updated on 15 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc