Forum Settings
Forums

[FEATURE REQUEST] Bulk requests & add fields param to users watchlist

New
Feb 13, 8:38 AM
#1
Offline
Jul 2023
1
Hello,
I'm currently working on a project where I manage a users watchlist through the API. However, I'm having some trouble as I'm quite often having to deal with rate-limits (even with quite aggressive caching)

When requesting items from the users watchlist, it doesn't have a "fields" parameter like the `/anime` endpoint does, which forces me to query each and every single anime in my watchlist for details and an additional query to get which episode I'm currently on, as there is no endpoint for that either

So I'm requesting a few new changes be made to the current api

1. Adding the "fields" parameter to `/users/:user/animelist` and `/users/:user/mangalist` endpoints

Currently, when constructing a view from the users lists you would likely need to query ratings, episodes, etc... whilst the API currently only outputs simple information like id, title and images

Getting to this information requires making a call for each item in the users lists, in turn making the code O(n) in time complexity. Querying for this information not only puts additional work on the server, takes unnecessarily long, but for users with large lists, might not even load before being backed off by rate limitations

This also somewhat works hand in hand with my other feature request

2. Bulk requesting for endpoints like `/anime/:id`

In the case where you maybe only have something like a list of IDs, you'd still need to query each and every single one through the details.

By adding a new `/anime/details` api with an `?ids=1,2,3` parameter, you could easily add bulk requesting to the API in a way which retains backwards compatibility as the old `/anime/:id` would still be untouched.

3. Personal information missing on authenticated list endpoints

Currently, when querying the authed endpoint you will not get any unique information about the items,
on the website you can view things such as episodes watched and what the status is set to.

Right now you can get this information, but it's very tricky as it requires additional API calls for what should only be one. a new `status` and `episodes_watched` fields should be added when querying for a users watchlist whilst authenticated



I apologize for the long post, I hope my feedback was constructive and could be used to improve the API in a positive direction,
Thank you!
Reply Disabled for Non-Club Members
Mar 29, 9:15 AM
#2

Offline
Apr 2010
2844
KibbeWater said:
When requesting items from the users watchlist, it doesn't have a "fields" parameter like the `/anime` endpoint does

Yes it does. The documentation may not be very clear about it, but nearly as many fields are available.

Currently, when querying the authed endpoint you will not get any unique information about the items,
on the website you can view things such as episodes watched and what the status is set to.

Yes you can. The syntax isn't well-documented, but you can add parameters such as :
fields=list_status{status,num_episodes_watched,start_date,finish_date,num_times_rewatched,is_rewatching}


For batch querying : I'd look at the /anime/ranking?ranking_type=all endpoint, which allow querying for up to 500 entries at a time (and can be paginated). Sure, you can't control exactly what you'll get in which order, but it's the easiest way to fetch all entries. (And again, it accepts most fields parameters, with only a few exceptions.)
Reply Disabled for Non-Club Members

More topics from this board

» I built a spotify-styled 'MyAnimeList Wrapped' for a yearly review of your anime and manga

XAvishkar - Dec 14

1 by Joeliazeers »»
Dec 17, 1:01 PM

» [Repost] list of all relation_type and media_type.

Mr_UnknownOtaku - Dec 8

4 by -DxP- »»
Dec 12, 8:43 AM

» How to get author name?

EdibleMuffin - Feb 12

4 by XAvishkar »»
Dec 8, 9:52 AM

» 401 Unauthorized when doing authorization flow

Konng_ - Nov 16

2 by Konng_ »»
Nov 28, 3:24 PM

» [discontinued] I made a webapp to compare plan-to-watch lists

daux - Apr 16, 2022

33 by daux »»
Oct 2, 4:17 PM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login