AurelicButter / AniList-Node

A lightweight Node.js wrapper for the AniList API
https://katsurin.com/docs/anilist-node/
MIT License
43 stars 18 forks source link

Update search.js #60

Closed 0x1026 closed 1 year ago

0x1026 commented 1 year ago

Description

I added a new property on anime & manga search entries to get the format of these.

Related Issue

None ^^

Other Information:

Useful when doing a search engine when u can only return a string.

return `${title.userPreferred} (${format})`
0x1026 commented 1 year ago

npm run docs needed? or it's just fine?

0x1026 commented 1 year ago

I added MediaStatus also.

Just for

return `${title...} (${status} ${format})`

npm run docs needed? or it's just fine?

npm run docs executed and non-break dependencies updated ^^

0x1026 commented 1 year ago

I removed this

if (json.data.Staff.description.length < 1) {
    json.data.Staff.description = null;
}

because image

Explanation: If there's no description, json.data.Staff.description is already null. There's no need to rewrite it another time.

AurelicButter commented 1 year ago

npm run docs needed? or it's just fine? npm run docs executed and non-break dependencies updated ^^

Don't worry about the docs. They get updated before every release 👍