thetvdb / v4-api

Founded in 2006, TheTVDB is one of the longest-running community-driven TV and Movie databases. With content metadata across hundreds of thousands of TV series and movies, TheTVDB powers many of the largest media centers in the market. Developers across the world build and rely upon TheTVDB's APIs to power their apps, utilities, and projects, generating millions of API calls per day. In our GitHub repository you will find all of the necessary support and v4 API documentation to make use of TheTVDB's metadata. Come and join us!
140 stars 13 forks source link

Performance #183

Open danhi opened 2 years ago

danhi commented 2 years ago

In order to get all the information for a TV Episode, I have to make 5 calls:

series//translations/ series//extended series//episodes/official episodes//extended episodes//translations/

This means it's close to 2 seconds to get all the data.

Any chance for coming up with an endpoint that would allow the data to be returned in fewer calls (better for you, better for me)?

antheaezzell commented 2 years ago

I think the meta=translations request on the extended endpoint would produce faster results as I understand it.

danhi commented 2 years ago

Great! That gets rid of one of the calls.

Thanks

From: antheaezzell @.> Sent: Tuesday, January 18, 2022 2:42 PM To: thetvdb/v4-api @.> Cc: Dan Hinsley @.>; Author @.> Subject: Re: [thetvdb/v4-api] Performance (Issue #183)

I think the meta=translations request on the extended endpoint would produce faster results as I understand it.

— Reply to this email directly, view it on GitHub https://github.com/thetvdb/v4-api/issues/183#issuecomment-1015859779 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZT5NKUS2CYPQISBVBDNOTUWXNBXANCNFSM5MH7UEGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AAZT5NIN7OU5RCNB5KEWO6TUWXNBXA5CNFSM5MH7UEGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHSGMUQY.gif Message ID: @. @.> >

danhi commented 2 years ago

It doesn't appear that I can use meta=translations on the series//episode endpoint. I cache the episode information so I don't need to go back to the API, but if I can't get the translation, then I have to make the call again even if I've cached the info.

antheaezzell commented 2 years ago

@danhi I think this should only require two calls: /series/{id}/extended?meta=translations /episodes/{id}/extended?meta=translations