2.0.1 • Published 2 years ago

@dovakiin0/anime-data v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Anime-Data

Gives you every anime details, including anime schedule for a week.

Usage

npm install @dovakiin0/anime-data

Basic Usage

const { AnimeData } = require("@dovakiin0/anime-data");

const anime = new AnimeData();
anime
  .searchAnime("oregairu")
  .then((res) => {
    // console.log(res)
    // list of anime that matches the search
    anime.getAnimeInfo(res[0].link).then((info) => {
      // console.log(info);
      // Anime details
      anime.getEpisode(info.slug, 1).then((episode) =>
        // gets the specific episode of the anime
        console.log(episode)
      );
    });
  })
  .catch((err) => console.log(err));

Get Popular Anime

const anime = new AnimeData();
anime
  .getPopular() // you can pass page parameter, default page is 1
  .then((res) => {
    console.log(res);
  })
  .catch((err) => console.log(err));

Get Recent Anime

const anime = new AnimeData();
anime
  .getRecent() // you can pass page parameter, default page is 1
  .then((res) => {
    console.log(res);
  })
  .catch((err) => console.log(err));

Get Anime By Genre

/* Get all genre */
anime
  .getAllGenre()
  .then((genres) => console.log(genres))
  .catch((err) => console.log(err));
/* [
  'Action',        'Adventure',    'Cars',
  'Comedy',        'Dementia',     'Demons',
  'Drama',         'Dub',          'Ecchi', ...]
  */
// Get anime by genre
anime
  .getAnimeGenre("Action") // you can pass page parameter, default page is 1
  .then((animes) => console.log(animes))
  .catch((err) => console.log(err));
// Returns a list of anime with 'Action" genre

Anime Schedule

const { AnimeSchedule } = require("@dovakiin0/anime-data");
const schedule = new AnimeSchedule();
schedule
  .getSchedule() // (Optional) pass day to get specific day. e.g. "monday", "tuesday"
  .then((anime) => console.log(anime))
  .catch((err) => console.log(err));
/*
Format
saturday: [{
  title: 
  img: 
  episode: 
  airing_time: 
}],

*/

Contributing

Fork the repo

git clone <forked-repo>
git checkout -b <new-feature>
git add <changed-file>
git commit -m "new feature"
git push origin <new-feature>

then submit a pull request

2.0.1

2 years ago

2.0.0

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago