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

ani-up

v0.0.1

Published

Wrapper for MyAnimeList and Hummingbird APIs in Node.js

Downloads

3

Readme

ani-up

Build Status NPM version

ani-up is a Node.js module that acts as a wrapper for the MyAnimeList and Hummingbird APIs. It currently supports search, user authentication, and list updating.

Installation

To install, run npm install ani-up in your project's home directory. If you need the latest, you can clone this repository - just make sure you install all the dependencies (see Contributing below).

Usage


Check out the documentation for detailed information on using ani-up.


MyAnimeList & Hummingbird

Most MAL and Hummingbird functions require 1) an API key and 2) a valid username and password for those sites. Currently, this module looks for a creds.js file to store your login credentials to MAL (and Hummingbird) in the project's home directory. Here's the basic format:

var creds = {}

creds.MAL_API_KEY = "your key here"

creds.MAL_USERNAME = "your username here"
creds.MAL_PASSWORD = "your password here"

creds.HUMMINGBIRD_API_KEY = "your key here"

creds.HUMMINGBIRD_EMAIL = "your email here"
creds.HUMMINGBIRD_USERNAME = "your username here"
creds.HUMMINGBIRD_PASSWORD = "your password here"

module.exports = creds;

With that, you can start calling the MAL and Hummingbird functions in your application. To obtain the MAL and Hummingbird submodules, you simply require them like so:

var aniup = require('ani-up');        // the entire module
var mal = aniup.mal;                  // the MAL module
var hummingbird = aniup.hummingbird;  // the hummingbird module

Here's a example that uses the Hummingbird search function.

var aniup = require('ani-up');
var hummingbird = aniup.hummingbird;

hummingbird.searchTopResult('barakamon', function(err, result) {
    if(err) {
        console.log(err);
    }   
    else {
        if(result) {
            console.log("Title: \t" + result.title);
        }
    }   
}); 

Parser

Parser is a standalone video file name parser that is bundled with this module. If you only need to use the parser (and neither the MAL nor Hummingbird functions), then you do not need to have a creds.js file.

require('aniup').parser;       // the proper way
require('aniup/lib/parser');   // only if you don't have/need creds.js

Running the demos

This Node.js module contains some basic demos in the examples/ directory. To run them, run these commands from the ani-up directory.

node example/mal-demo.js [optional search query]

node example/hummingbird-demo.js [optional search query]

Contributing

Help is always welcome. Continue reading if you would like to set up development for this project! There's a lot of cool features and additions planned, so head over to the wiki for some ideas.

Dependencies

  • request - simplified HTTP request client
  • node-xml2js - XML to JavaScript object converter (soon)

For contributors to ani-up

  • mocha - simple, flexible, fun javascript test framework for node.js & the browser

Installing dependencies

npm install [module name]

Running the tests

Note: requires the mocha node module to run.

npm test