https://github.com/nirewen/popcorn-api
A library to access the PopcornTime API
https://github.com/nirewen/popcorn-api
api nodejs popcorn time
Last synced: about 1 year ago
JSON representation
A library to access the PopcornTime API
- Host: GitHub
- URL: https://github.com/nirewen/popcorn-api
- Owner: nirewen
- License: mit
- Created: 2018-10-28T20:09:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-03T20:27:24.000Z (over 5 years ago)
- Last Synced: 2025-04-11T18:24:52.735Z (about 1 year ago)
- Topics: api, nodejs, popcorn, time
- Language: JavaScript
- Size: 195 KB
- Stars: 11
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm][download-badge]][npm]
[![David][dep-badge]][dep-link]
[![Build Status][build-badge]][build-link]
![GitHub license][mit]
[![NPM][large-badge]][stats-link]
# Popcorn API [![Version Badge][version-badge]][npm]
Easy way to get data from the Popcorn Time API
Documentation is available at https://popcorn-api.js.org/
## Installation
Via NPM:
```sh
$ npm install popcorn-api
```
## 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
```javascript
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](?content=examples)
[npm]: https://npmjs.org/package/popcorn-api
[large-badge]: https://nodei.co/npm/popcorn-api.png?downloads=true&downloadRank=true&stars=true
[stats-link]: https://nodei.co/npm/popcorn-api/
[version-badge]: https://versionbadge.now.sh/npm/popcorn-api.svg
[download-badge]: https://img.shields.io/npm/dt/popcorn-api.svg?maxAge=3600
[build-badge]: https://api.travis-ci.com/nirewen/popcorn-api.svg?branch=master
[build-link]: https://travis-ci.com/nirewen/popcorn-api
[dep-badge]: https://img.shields.io/david/nirewen/popcorn-api.svg
[dep-link]: https://david-dm.org/nirewen/popcorn-api
[mit]: https://img.shields.io/badge/license-MIT-blue.svg