-
Notifications
You must be signed in to change notification settings - Fork 38
Genres
George Kye edited this page Feb 16, 2016
·
5 revisions
Get the list of movie OR tv genres
GenresMDB.genres(apikey, listType: "tv", language: "FR"){
apiReturn in
let genres = apiReturn.MBDBReturn as! [GenresMDB]
for i in genres {
print(i.name)
}
}
Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included.
//Get all Western(37) movies, exclude adult movies
GenresMDB.genre_movies(apikey, genreId: 37, include_all_movies: true, include_adult_movies: false, language: "EN"){
apiReturn in
print(apiReturn.pageResults?.total_pages)
print(apiReturn.pageResults?.total_results)
let movie = apiReturn.MBDBReturn as! [MovieMDB]
print(movie[0].title)
print(movie[0].original_title)
print(movie[0].release_date)
print(movie[0].overview)
}