TMDb icon indicating copy to clipboard operation
TMDb copied to clipboard

Add query parameter languageCode to movie details endpoint

Open armintelker opened this issue 1 year ago • 2 comments

I am not sure if I have done everything correct. The details endpoint for movies is missing the language endpoint
I have added it.

armintelker avatar May 01 '24 20:05 armintelker

@armintelker Thanks for the PR.

This issue seems odd. The language code is added to ALL requests in the APIClient https://github.com/adamayoung/TMDb/blob/17d8acefb41cd33b423357a831d4126aea6f4fa2/Sources/TMDb/Networking/TMDbAPIClient.swift#L123C32-L123C59

And the language code comes from here https://github.com/adamayoung/TMDb/blob/17d8acefb41cd33b423357a831d4126aea6f4fa2/Sources/TMDb/Adapters/LocaleProvider.swift#L24

Can you double check this is behaving correctly, and it's not just an issue on fetching movie details?

adamayoung avatar May 01 '24 20:05 adamayoung

@adamayoung Hey maybe I am understanding it wrong but how can I set the language code without changing the OS language? I am from Germany and I want to fetch the movie details in English and German. I have searched in the documentation and the code but everything that would help me to change the language code is not public and only accessible inside the library.

armintelker avatar May 01 '24 20:05 armintelker

Hi @armintelker. I'm going to close this PR in favour of this one #176 which adds the ability to add language (and region/country) to all methods which have it available from TMDb.

adamayoung avatar May 15 '24 10:05 adamayoung