I had built out a horror movie bucket list app back at the end of my bootcamp and I am starting to refactor it now and one of the things I want to do is get rid of the 279 movies(box art, description, sub-genre) and use this API to pull in as many horror movies as I can to really flesh out this app for horror hounds like myself and I cannot seem to get the request figured out to just pull any movie with horror in the genre. Any help would be greatly appreciated.
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 š§š· pt-BR
on August 16, 2022 at 9:25 PM
Discover - Filter by Genre
Tip: For TV Show the procedure is similar.
First you need to have the list of Genres with their IDs.
The list of Genre IDs is here, for Movie and TV Show.
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 Horror Genre ID for movies is 27.
Knowing the Genre ID you want, make an API Request of type get / discover / movie
https://developers.themoviedb.org/3/discover/movie-discover
And use the with_genres and/or without_genres parameter.
More than one genre can be searched using the comma or pipe feature
Example
Reply by PhilipJobe
on August 17, 2022 at 10:28 AM
Thank you so much I just need to add the pagination to it and that should give me all of them. And look into seeing if it will also give me the posters and stuff like that but the first issue has been solved and I thank you.