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.
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por ticao2 🇧🇷 pt-BR
el 28 de mayo de 2020 a las 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.