TMDbLib icon indicating copy to clipboard operation
TMDbLib copied to clipboard

Add grouped season fetching

Open Naliath opened this issue 11 years ago • 2 comments

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]

Naliath avatar Dec 27 '13 10:12 Naliath

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.

LordMike avatar Jun 18 '15 19:06 LordMike

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.

Naliath avatar Jan 29 '16 09:01 Naliath