TMDbLib
TMDbLib copied to clipboard
Add grouped season fetching
Based on the following comment in the forums we could add something that wraps this functionality.
Is it possible to fetch all episodes with a single query?
If I understand correctly, currently /3/tv/:id returns only the available season numbers, and I'd have to send a request for each season to /3/tv/:id/season/:num in order to fetch all episodes. This would be undesirable in some cases, where there are just way too many seasons.
Thank you for your response in advance.
EDIT: Nevermind, I've figured it out. Solution in case anyone else is bothered by this: /3/tv/:id?api_key=:key&append_to_response=season/1,season/2[,etc]
We can make special methods that wrap the functionality. Obviously, we can't do it with the current layout, as they're for single-objects only.
But it might be a really good thing to have though.
There is a maximum number of calls one can make and each of these chained calls counts to that limit. So if we decide to implement this we should take this into account and perhaps split the seasons over multiple calls.