v3.2.6 - Added type, subtype and page tops

pull/4/head v3.2.6
Jéluchu 5 years ago
parent d80ab08a1a
commit 64601c4914

@ -1,4 +1,4 @@
# **Aruppi API** (v3.2.5)
# **Aruppi API** (v3.2.6)
> This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture
>

@ -1,6 +1,6 @@
{
"name": "aruppi",
"version": "3.2.5",
"version": "3.2.6",
"description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app",
"main": "./src/api/api.js",
"scripts": {

@ -50,7 +50,16 @@ const top = async (top) =>{
data = await homgot(`${BASE_JIKAN}top/${top.type}/${top.page}`, { parse: true });
}
return data.top
return data.top.map(doc =>({
rank: doc.rank,
title: doc.title,
url: doc.url,
image_url: doc.image_url,
type: top.type,
subtype: top.subtype,
page: top.page,
score: doc.score
}));
};
@ -438,7 +447,7 @@ const getAnimeGenres = async(genres) => {
for (let i = 0; i <= data.length - 1; i++) {
promises.push({
id: data[i].id || null,
title: data[i].title || null,
title: data[i].title.trim() || null,
mention: genres.genre,
page: genres.page,
poster: data[i].poster || null,

Loading…
Cancel
Save