npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

crunchyroll.js

v1.1.0

Published

a nodejs crunchyroll api

Downloads

23

Readme

About

crunchyroll.js is an npm module that allows you to easily access the Crunchyroll API.

Warning

This project is not affiliated with or endorsed by Crunchyroll. The use of this project may violate the terms of service between you and stream provider. Use with caution and at your own risk.

Installation

npm i crunchyroll.js

Basic Usage

const cr = require('crunchyroll.js');

(async () => {
    // Login to crunchyroll
    await cr.login(email, password);

    // Get anime info
    const anime = await cr.getAnime("GY9PJ5KWR"); // "Naruto"
    
    // Get anime seasons and eps
    const { items: seasons } = await cr.getSeasons(anime.id);
    const eps = await cr.getEps(seasons[0].id);
})();

Examples

• Change default language

await cr.login(email, password, "pt-BR");

• Get user profile

const profile = await cr.getProfile();

• Search anime/episode/movie

const search = await cr.search("naruto");

• Get anime info

const categories = await cr.getCategories("[anime-id]");
const rate = await cr.getRate("[anime-id]");
const similar = await cr.getSimilar("[anime-id]", 10);

• Get NewsFeed

const newsFeed = await cr.getNewsFeed();
console.log(newsFeed.latest_news.items[0]); // Log the latest

• Get last updated animes list

// Get last 10 animes
const { items } = await cr.getAllAnimes(0, 10, "newly_added");
// Log animes title
console.log(items.map(anime => anime.title));

• Basic episodes counting system by anime seasons

const anime = await cr.getAnime("GY9PJ5KWR");
const { items: seasons } = await cr.getSeasons(anime.id);
console.log(`${anime.title} Seasons:`);
for(season of seasons) {
    const episodes = await cr.getEpisodes(season.id);
    console.log(`${season.title}: ${episodes.total} eps`);
}

Contributing - bug fixes

Contributions are welcome! Please feel free to open an issue or submit a pull request, for bug fixes or new features.

  1. Fork the repository
  2. Create a new branch git checkout -b <new-feature-name>
  3. Make the changes
  4. Commit the changes git commit -am "Add new feature"
  5. Push the changes git push origin <new-feature-name>
  6. Create a pull request on GitHub

Many thanks!