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

youtube-api-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-api-client

A simple client to work with Youtube API.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

Youtube API Client

Build Status Coverage Status

A simple client to work with the Youtube API.

Installation

$ npm install youtube-api-client --save

How to use

ES6

import YoutubeAPI from 'youtube-api-client';

const youtube = new YoutubeAPI({
  apiKey: 'YOUR_TOKEN_HERE'
});

youtube.getSearchResultsFor('Five Finger Death Punch');

CommonJS

const youtube = require('youtube-api-client');

const youtube = new YoutubeAPI({
  apiKey: 'YOUR_TOKEN_HERE'
});

youtube.getSearchResultsFor('Asking Alexandria');

UMD in Browser

<!-- to import non-minified version -->
<script src="youtube-api-client.js"></script>

<!-- to import minified version -->
<script src="youtube-api-client.min.js"></script>

After that the library will be available to the Global as YoutubeAPI. Follow an example:


const youtube = new YoutubeAPI({
  apiKey: 'YOUR_TOKEN_HERE'
});

youtube.getSearchResultsFor('Angra');

Methods

Follow the methods that the library provides.

getSearchResultsFor(query)

Search for youtube videos with provided query.

Arguments

ArgumentTypeOptions
querystring'Any search query'

Example

youtube.getSearchResultsFor('Pink Floyd')
  .then(result => {
    // do what you want with the result
  });

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Caue Queiroz
Caue Queiroz

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Keywords

FAQs

Package last updated on 19 Mar 2018

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