popcorn-api-browser
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

npm David Build Status GitHub license

NPM

Popcorn API Browser Version Badge

Easy way to get data from the Popcorn Time API in the browser

Documentation is available at https://popcorn-api.js.org/ (originally for node, but works for this fork too)

Installation

Via NPM:

$ npm install popcorn-api-browser

Usage

Popcorn-API comes with 3 routes you can use: anime, shows and movies.
To access a route, you use it as a property of PopCorn: PopCorn.[route].

Examples

const PopCorn = require('popcorn-api');
 
// * Search for Animes using query 'kill'
PopCorn.animes.search({query: 'kill'})
    .then(async ([anime]) => {
        await anime.fetch();
 
        console.log(anime); // -> Anime
    });
 
// * Search for TV Shows using query 'flash'
PopCorn.shows.search({query: 'flash'})
    .then(([show]) => show.fetch())
    .then(console.log); // -> Show

Find more examples in Examples

Readme

Keywords

Package Sidebar

Install

npm i popcorn-api-browser

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

41.6 kB

Total Files

14

Last publish

Collaborators

  • vltmn