1.0.2 • Published 6 years ago

youtube-api-client v1.0.2

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

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

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago