PolyMeilex / node-myanimelist

Node-MyAnimeList is a small promise based package for downloading information from MyAnimeList
25 stars 5 forks source link

Fix `list_status` on `animelist()` and `mangalist()` #42

Closed felixbrucker closed 1 year ago

felixbrucker commented 1 year ago

Currently when doing a animelist() or mangalist() the list_status is appended to the fields param without a comma separator. This works fine if no fields are requested, but fails when one or more fields are requested.

Example url without the fix:

https://api.myanimelist.net/v2/users/<some user>/animelist?offset=10&fields=start_date%2Cend_date%2Cstatus%2Cnum_episodeslist_status&nsfw=1&status=plan_to_watch&limit=10

In the example above this results in neither the list_status nor the num_episodes being included.

This PR fixes this by ensuring we always add commas between serialized fields.

PolyMeilex commented 1 year ago

Thanks!

felixbrucker commented 1 year ago

Hey, do you plan to release these fixes soon?

PolyMeilex commented 1 year ago

Done 4.1.1 is out.

felixbrucker commented 1 year ago

Great thanks 👍

felixbrucker commented 1 year ago

Unfortunately it seems like 4.1.1 still ships the old code on npm

PolyMeilex commented 1 year ago

Oh my bad, forgot to recompile ts :smile: Fixed in 4.1.2

felixbrucker commented 1 year ago

Thanks 👍