blakejoy / tmdb-ts

Typescript client wrapper for TheMovieDB (TMDB) v3
MIT License
37 stars 12 forks source link

Is passing language query param possible? #39

Closed reaver585 closed 6 months ago

reaver585 commented 10 months ago

Hi. Thanks for writing this useful tool.

My question is the following: I would like to query the movie details, using a language that is not English.

Is this possible?

Thanks in advance.

jeremyVignelles commented 9 months ago

I have the same issue when trying to call this code:

        const resultats = await tmdb.search.movies({
            language: 'fr-FR',
            query: recherche,
            page: page,
        })

The binding does not have this parameter, but it's just a typescript error (the code does work), so you can ignore it with typescript techniques like as any

        const resultats = await tmdb.search.movies({
            language: 'fr-FR',
            query: recherche,
            page: page,
        } as any)

This should be fixed in the library, and I'm going to send a PR for that soon.

jeremyVignelles commented 9 months ago

PR #42 submitted :)