Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello i can change language for discripton movie ? #87

Open
billele opened this issue Mar 21, 2018 · 1 comment
Open

hello i can change language for discripton movie ? #87

billele opened this issue Mar 21, 2018 · 1 comment

Comments

@billele
Copy link

billele commented Mar 21, 2018

hello i can change language for discripton movie ? and why i have not picture but poster_path => /2h00HrZs89SL3tXB4nbkiM7BKHs.jpg for link. ?
thx for help

@KevinMidboe
Copy link

KevinMidboe commented Mar 22, 2018

If you want the description in a different language pass a language parameter[0]. You need to find the language code for the language you want, tmdb uses ISO 639-1 codes and can be found on wikipedia here[1].

As with the picture. A image is not sent in return, just the link to the image to reduce the size of the response. To get the image you need to append (or add) the poster_path value (in your case: /2h00HrZs89SL3tXB4nbkiM7BKHs.jpg) to the image endpoint for themoviedb.
You can read more about this on the official docs[2] it, but in summary what you need to do is add append the response to https://image.tmdb.org/t/p/w500 where w500 is the width you want. In your example it would be https://image.tmdb.org/t/p/w500/2h00HrZs89SL3tXB4nbkiM7BKHs.jpg.
Here is a list of the sizes available: https://www.themoviedb.org/talk/53c11d4ec3a3684cf4006400?language=en.

[0]
Here you want to change the value of id and language to what you want.

const moviedb = require('moviedb');

let tmdbLibrary = moviedb(apiKey);
let method = 'searchMovie';
let argument = { id: 329865, language: 'no'};

tmdbLibrary[method](argument, callback)

[1] https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
[2] https://www.themoviedb.org/talk/53c11d4ec3a3684cf4006400?language=en

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants