animepill-api
scrapes videos from animepill
installation
npm install --save animepill-api
usage
const Anime = ;const client = ; client ; client ;
docs
Anime
Kind: global class
- Anime
- new Anime(prefix, url)
- .search(query) ⇒
Promise.<Array.<Object>>
- .getEpisodes(slug) ⇒
Promise.<Object>
- .getEpisode(slug) ⇒
Promise.<Array.<Object>>
new Anime(prefix, url)
constructor, instantiates the object
Param | Type | Description |
---|---|---|
prefix | string |
it uses this in front of the request, you could use this to prevent cors errors in browsers |
url | string |
the url to make request to, default: http://animepill.com |
Promise.<Array.<Object>>
anime.search(query) ⇒ searches for anime
Kind: instance method of Anime
Returns: Promise.<Array.<Object>>
- an array with results
Param | Type | Description |
---|---|---|
query | string |
what you are searching for |
Promise.<Object>
anime.getEpisodes(slug) ⇒ gets episodes of an anime
Kind: instance method of Anime
Returns: Promise.<Object>
- an object with all the episodes
Param | Type | Description |
---|---|---|
slug | string |
the slug of an anime you can get a slug in a search |
Promise.<Array.<Object>>
anime.getEpisode(slug) ⇒ searches for anime
Kind: instance method of Anime
Returns: Promise.<Array.<Object>>
- an array with the episode mp4 uri
Param | Type | Description |
---|---|---|
slug | string |
the slug of an anime you can get a slug in a search |