I'm making a react App that uses the movie API, but I have trouble understanding how to use the genre API to filter out the genre ID?
Is there a specific step-by-step guide for this? I'm very noobish at this.
Es fehlt ein Film oder eine Serie? Logge dich ein zum Ergänzen.
Diesen Eintrag bewerten oder zu einer Liste hinzufügen?
Kein Mitglied?
Antwort von ticao2 🇧🇷 pt-BR
am 28. Mai 2020 um 10:46
Every genre has a corresponding ID.
On this link, using your Key, you can obtain this list of correspondence.
https://developers.themoviedb.org/3/genres/get-movie-list
An API Request for Movies.
Another API Request for TV Show.
If you specify a language-Country, you will receive genres in that language.
So, when an API Request is made using the Gender parameter, what is specified in the Request is the Gender ID, not the Gender word.
So, when a user of your react App requests movies with the Genre Action, your react App will convert Action to 28 and send the API Request with Genre ID 28.