Pull Random Anime from a JSON Object
use NPM to install our Package
npm i animerandomizer
const animeRandomizer = require('anime-Randomizer')
// Require the package
let randomizer = new animeRandomizer()
// lets get information on a Anime!
console.log(randomizer.animeRandomizer())
/*
Returns:
{
"englishName":"Naruto: Shippuuden",
"japaneseName":"Naruto Hurricane Chronicles",
"characters":{
"mainCharacter": {
"name": "Naruto, Uzumaki",
"image": "https://cdn.myanimelist.net/images/characters/11/274173.webp"
},
"sideCharacter": [
{
"englishName": "Sasuke Uchiha",
"shortName": "Sasuke",
"japaneseName": "Uchiha Sasuke"
},
{
"englishName": "Sakura Haruno",
"shortName": "Sakura",
"japaneseName": "Haruno, Sakura"
}
]
}
}
*/
// Lets get information on a manga!
console.log(randomizer.mangaRandomizer())
/*
Returns:
{
englishName: 'Haikyu!!',
japaneseName: 'High Kyuu!!',
characters: { mainCharacter: 'Hinata, Shouyou' }
}
*/
Method | Return |
---|---|
.animeRandomizer() | Object |
.mangaRandomizer() | Object |
.numberRandomizer() | Number * This is to be used when generating a random amouunt of anime or Manga as it contains the amount of side characters we support |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.