Skip to content
George Kye edited this page Oct 26, 2016 · 5 revisions

Genre List

Get the list of movie OR tv genres

    GenresMDB.genres(apikey, listType: .tv, language: "en"){
      apiReturn, genres in
      if let genres = genres{
        genres.forEach{
          print($0.name)
        }
      }
    }

###Movie List based on genre id 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_adult_movies: false, language: "EN"){
      apiReturn, movies in
      if let movie = movies{
        print(movie[0].title)
        print(movie[0].original_title)
        print(movie[0].release_date)
        print(movie[0].overview)
      }
    }
Clone this wiki locally