Need support? Click here
$ npm install anime-facts
$ yarn add anime-facts
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 ) |
const AnimeFact =require("anime-facts");
const api = new AnimeFact("YOUR TOKEN");
api.getFact().then((res) => console.log(res));
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 | Description |
---|---|
getFact | Generate random anime facts. |
@LamkasDev for adding facts to prior database. PR #1
@xMercyTheDeveloper for adding a fact to prior database. PR #2
@Lioness100 for adding types and improving codes in version 2.2.6. PR #3 and #4