adamayoung / TMDb

The Movie Database Swift Package
https://adamayoung.github.io/TMDb/documentation/tmdb
Apache License 2.0
109 stars 28 forks source link

Add query parameter languageCode to movie details endpoint #173

Closed armintelker closed 4 months ago

armintelker commented 4 months ago

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

adamayoung commented 4 months ago

@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?

armintelker commented 4 months ago

@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.

adamayoung commented 4 months ago

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.