Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 2.38 KB

README.md

File metadata and controls

81 lines (58 loc) · 2.38 KB

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

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