Git Product home page Git Product logo

anidbjs's Introduction

Node AniDB wrapper

Build Status dependency status dev dependency status License Downloads

npm badge

A minimalistic AniDB HTTP API wrapper for Node.js.

This module provides a very minimal interface to fetch data from anidb.net. You may want to read the guidelines in the anidb wiki first.

You need a client registered on AniDB to use this "lib".

Usage

The module exports a constructor function which accepts 2 objects - credentials and options as its only two arguments.

When consuming the response object, you're going to have to check for undefined in certain nested objects such as character.seiyuu and similar ¯\_(ツ)_/¯

Optional chaining might be helpful here.

Options

These are the available config options that are passed to the 2nd constructor argument.

{
  // `url` is the server baseURL that will be used for the request
  url: 'http://api.anidb.net:9001/httpapi', // default

  // the request timeout in milliseconds
  timeout: 5 * 1000, // default

  // proxy server url
  proxy: '192.168.1.1:9000',

  // any additional headers that you'd like to pass
  headers: {
    'User-Agent': 'my-cool-app/1.0.0'
  }
}

Example

const AniDb = require("anidbjs");
const client = new AniDb({ client: "myclient", version: 1 });

client
  .randomRecommendation()
  .then(res => console.log(res))
  .catch(err => console.error(err));

client
  .anime(1)
  .then(res => {
    res.characters.forEach(char =>
      console.log(char.seiyuu && char.seiyuu.name)
    );
  })
  .catch(err => console.error(err));

anidbjs's People

Contributors

greenkeeper[bot] avatar groenlid avatar hexrabbit avatar koji98 avatar miraris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hexrabbit koji98

anidbjs's Issues

Resources

Add resources mappings, no idea what those are.

<resources>
   <resource type="2">
      <externalentity>
         <identifier>29575</identifier>
      </externalentity>
   </resource>
   <resource type="4">
      <externalentity>
         <url>http://a1c.jp/~collabo/product/mankitu01.html</url>
      </externalentity>
      <externalentity>
         <url>http://a1c.jp/~collabo/product/mankitu02.html</url>
      </externalentity>
      <externalentity>
         <url>http://a1c.jp/~collabo/product/mankitu03.html</url>
      </externalentity>
      <externalentity>
         <url>http://a1c.jp/~collabo/product/mankitu04.html</url>
      </externalentity>
   </resource>
   <resource type="14">
      <externalentity>
         <identifier>14650</identifier>
         <identifier>v</identifier>
      </externalentity>
   </resource>
</resources>

Creators

Add mappings for creators

   <creators>
      <name id="4303" type="Music">Hattori Katsuhisa</name>
      <name id="4234" type="Direction">Nagaoka Yasuchika</name>
      <name id="4516" type="Character Design">Watabe Keisuke</name>
      <name id="8924" type="Series Composition">Yoshinaga Aya</name>
      <name id="4495" type="Original Work">Morioka Hiroyuki</name>
   </creators>

Recommendations

Add mappings for recommendations

   <recommendations total="20">
      <recommendation type="Recommended" uid="567190">As has been said, a solid space opera, but where it really shines is the two protagonists and how they interact. They have misunderstandings constantly, but they just talk it out until they come to a better understanding of each other. It`s beautiful.

The series does have its issues. The art style and animation are fine despite the age, but the direction and editing are incredibly shoddy at times and the pacing is off where subplots are concerned. Not to mention the overly drawn out, drily delivered exposition at the start of every episode.

That said, at 13 episodes it`s still an easy recommendation. Watching two people work that hard at empathy is such a rare treat. Don`t miss this if you want some refreshingly straightforward romance.</recommendation>
      <recommendation type="Recommended" uid="350281">Space opera with an exciting buildup and a sublime crescendo. 4X players, don`t miss this!</recommendation>
      <recommendation type="Recommended" uid="112858">If you`re into scifi and generally more sophisticated stuff than brainless entertainment, this is a must see. Everyone else at least take a close look, you might be suprised.</recommendation>
      <recommendation type="Must See" uid="411532">Strong characters and Great plot.  One of the best Space Opera`s I`ve seen.</recommendation>
      <recommendation type="Must See" uid="284037">Awesome! Dunno what to say, but it`s just.... awesome!</recommendation>
      <recommendation type="Must See" uid="125868">This is the second best anime of all time, behind seikai no senki II closely followed by seikai no senki II.  This is a must see anime.  Excellenet plots, environment, characters, development, and re-watch value.</recommendation>
      <recommendation type="Must See" uid="691547">An awesome space opera
that tries to answer a simple yet complicated question:
Can humans be friends with aliens?
So if you`re looking for an answer watch this.
Btw think of this series as a small grandchild
of a great EPIC like LoGH
but with Lafiel in the lead</recommendation>
   </recommendations>

Characters

Add mappings for characters

   <characters>
      <character id="28" type="main character in" update="2012-07-25">
         <rating votes="1182">9.20</rating>
         <name>Abriel Nei Debrusc Borl Paryun Lafiel</name>
         <gender>female</gender>
         <charactertype id="1">Character</charactertype>
         <description>Ablïarsec néïc Dubreuscr Bœrh Parhynr Lamhirh (a.k.a., Viscountess Paryunu Abriel Nei Dobrusk Lafiel) is the main female protagonist in the anime Crest of the Stars, Banner of the Stars, and Banner of the Stars II, as well as all the novels written by Morioka Hiroyuki on which the shows were based. She is a strong-willed Abh princess (granddaughter of the Abh empress) who has a steely exterior, but ends up befriending Ghintec Linn (Jinto Lynn in the Martinh tongue). Like all Abh, she has bluish hued hair, and has a natural lifespan of over 200 years. Lamhirh also has lapis lazuli colored eyes. As an Ablïarsec, she has pointed ears, yet hers are markedly less so than other Ablïarsec. This is because half her genes (those not from her father) are from someone outside the Abriel clan and her father chose not to make any unnecessary alterations in her genes. She is deemed "child of love" (an Abh child with the genes of the parent, and the one the parent loves). Her full name can be roughly translated to Lamhirh (néïc Dubleuscr) Ablïarsec, Viscountess of Parhyn.
Despite being a princess, she rarely acts like one and hates being treated as one. One of the reasons she took a liking towards Ghintec is because when they first met, he neither recognized her as a princess nor treated her as one. Their relationship is so close that she freely allows him to use her real name of Lamhirh when addressing her, something that is very uncommon when addressing those of nobility or royalty.
She acts remarkably older than her age (at her introduction in Crest of the Stars, she is 16 years old) and can, in most cases, logically think her way out of most situations. However, her headstrong nature sometimes clouds her judgement and can lead her to become impulsive. An example of this is when she is reprimanded by Laicch for wishing to stay behind on the Gothlauth instead of continuing her mission of escorting Ghintec to the capital. She believes that she would have been of more use fighting with the crew rather than abandoning them. She is quickly shown how wrong her line of reasoning is and how much more disgraceful it would have been to abandon Ghintec and her mission. She is a remarkably good shot and although she sometimes doubts herself, she proves to be a worthy ship captain (deca-commander) in Banner of the Stars. She shows little emotion throughout Crest of the Stars, but as time goes by became very close friend with Ghintec through Banner of the Stars. This is especially true in later installments, where she more frequently questions how their friendship will last due to the doubt of Ghintec`s lifespan.
She is one of the candidates for the Abh Imperial Throne and, as indicated by her full name, she is the Viscountess of Parhynh, the so-called "Country, or Nation, of Roses."</description>
         <picture>14304.jpg</picture>
         <seiyuu id="12" picture="184301.jpg">Kawasumi Ayako</seiyuu>
      </character>
</characters>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.