anime-facts

Generate random anime facts.

Usage no npm install needed!

<script type="module">
  import animeFacts from 'https://cdn.skypack.dev/anime-facts';
</script>

README

Generate random anime facts with a huge database.

Powered by Airi

Need support? Click here

First make sure you have a Airi API Token. Join this discord server to get one.

Installation:

NPM

$ npm install anime-facts

YARN

$ yarn add anime-facts

Query parameters [ OPTIONAL ]

Parameters Type Description
tags String Filter random fact by tag(s). Takes a list of one or more tag names, separated by a comma (meaning AND) or a pipe (meaning OR). A comma separated list will match facts that have all of the given tags. While a pipe (\|) separated list will match facts that have either of the provided tags.
minLength Int The minimum Length in characters ( can be combined with maxLength )
maxLength Int The maximum Length in characters ( can be combined with minLength )

Usage:

const AnimeFact = require("anime-facts");
const api = new AnimeFact("YOUR TOKEN");

api.getFact().then((res) => console.log(res));

Using Query:

const AnimeFact = require("anime-facts");
const api = new AnimeFact("YOUR TOKEN");
// Note currently there are only fews tags, length available in the database. So, it might return the same data multiple times.
api.getFact(null, 1, 100).then((res) => console.log(res));

// Returns with:
{
  id: 5,
  tags: [ 'TEZUKA Osamu', 'Artist' ],
  fact: 'TEZUKA Osamu is the most famous manga artist in Japan.',
  length: 54
}

Functions

Functions Description
getFact Generate random anime facts.

Credits

@LamkasDev for adding facts to prior database
@xMercyTheDeveloper for adding a fact to prior database
@Lioness100 for adding types and improving codes in version 2.2.6
@Aetrnyx for fixing the readme in 4.3.9