react-native-animepill-api
v1.0.9
Published
scrapes videos from animepill
Downloads
3
Maintainers
Readme
animepill-api
scrapes videos from animepill
installation
npm install --save animepill-api
usage
const Anime = require("animepill-api");
const client = new Anime();
client.getEpisodes("bleach")
.then(eps => eps[3].getEpisode())
.then(vids => console.log(vids));
client.search("bleach")
.then(res => {
return res.find(x => x.type === "TV")
.getEpisodes();
})
.then(eps => console.log(eps));
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 |
anime.search(query) ⇒ Promise.<Array.<Object>>
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 |
anime.getEpisodes(slug) ⇒ Promise.<Object>
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 |
anime.getEpisode(slug) ⇒ Promise.<Array.<Object>>
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 |