Sprijin Bază de date filme (The Movie Database)

I am creating a netflix clone, how do I get the exact endpoint for each genre.

I already have these endpoints and they work
popular: ${baseUrl}/movie/popular?api_key=${key},
topRated: ${baseUrl}/movie/top_rated?api_key=${key},
trending: ${baseUrl}/movie/popular api_key=${key}&language=en=US&page=2,
upcoming: ${baseUrl}/movie/upcoming?api_key=${key},

WHAT ARE THE ENDPOINTS FOR EVERY GENRE, ACTION, HORROR, CRIME .....,
the tmdb docs do not tell me this and i cant seem to find them anywhere

1 răspuns (pe pagina 1 din 1)

Jump to last post

@brockjgriffin1 said:
PLEASE HELP!!!!
I am creating a netflix clone, how do I get the exact endpoint for each genre.

I already have these endpoints and they work
popular: ${baseUrl}/movie/popular?api_key=${key},
topRated: ${baseUrl}/movie/top_rated?api_key=${key},
trending: ${baseUrl}/movie/popular api_key=${key}&language=en=US&page=2,
upcoming: ${baseUrl}/movie/upcoming?api_key=${key},

WHAT ARE THE ENDPOINTS FOR EVERY GENRE, ACTION, HORROR, CRIME .....,
the tmdb docs do not tell me this and i cant seem to find them anywhere

There is not one for each genre.
You must use Discover and filter by Genre ID.

Discover - Filter by Genre
First you need to have the list of Genres with their IDs.
The list of Genre IDs, for Movies and TV, can be found here:
get/genre/movie/list - https://developers.themoviedb.org/3/genres/get-movie-list
get/genre/tv/list - https://developers.themoviedb.org/3/genres/get-tv-list

For example, the Comedy Genre ID for movies is 35.

Knowing the Genre ID you want, make an API Request of type:
get / discover / movie
https://developers.themoviedb.org/3/discover/movie-discover
get / discover / tv
https://developers.themoviedb.org/3/discover/tv-discover
And use the with_genres and/or without_genres parameter.
More than one genre can be searched using the comma or pipe feature

Also note that a number of filters support being comma (,) or pipe (|) separated.
Comma's are treated like an AND and query while Pipe's are an OR.

AND (with Comma) &with_genres=35,37,80
OR (with Pipe) &with_genres=35|37|80
You cannot mix AND with OR. Either one or the other.

You can use any other filter simultaneously.
&year=, &sort_by=, &with_cast= etc...

Example

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80  
https://api.themoviedb.org/3/discover/tv?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80  

Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.

Globale

s focalizează bara de căutare
p deschide meniul profilului
esc închide o fereastră deschisă
? deschide fereastra cu scurtături de la tastatură

Pe paginile media

b mergi înapoi (sau la părinte atunci când este cazul)
e mergi la pagina de editare

Pe paginile sezoanelor filmelor seriale

(săgeată dreapta) mergi la sezonul următor
(săgeată stânga) mergi la sezonul precedent

Pe paginile episoadelor filmelor seriale

(săgeată dreapta) mergi la episodul următor
(săgeată stânga) mergi la episodul precedent

Pe toate paginile de imagini

a deschide fereastra pentru adăugarea de imagini

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimite formularul

Pe paginile de discuții

n crează o discuție nouă
w comută starea de vizionare
p comută publică/privată
c comută închisă/deschisă
a deschide activitatea
r răspunde la discuție
l mergi la ultimul răspuns
ctrl+ enter trimite mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina precedentă

Setări

Doriți să evaluați sau să adăugați acest articol într-o listă?

Autentificare