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

Search for companies by name.

    SearchMDB.company(apikey, query: "Sony", page: 1){
      data, cp in
      print(cp?[0].id)
      print(cp?[0].logo_path)
      print(cp?[0].name)
    }

Search for collections by name. Overview and collectionItems will return nil

        SearchMDB.collection(apikey, query: "Superman", page: 1, language: "en"){
      data, cl in
      print(cl?[0].id)
      print(cl?[0].name)
      print(cl?[0].backdrop_path)
    }

Search for keywords by name.

    SearchMDB.keyword(apikey, query: "Fight", page: 1){
     data, wrds in
      print(wrds?[0].id)
      print(wrds?[0].name)
    }

Search for lists by name and description.

    SearchMDB.list(apikey, query: "Action", page: 1, include_adult: true){
      list in
      print(list.list?[0].description)
      print(list.list?[0].name)
    }

Search for movies by title.

      SearchMDB.movie(apikey, query: "Superman", language: "en", page: 1, includeAdult: true, year: nil, primaryReleaseYear: nil){
      data, movies in
      print(movies?[0].title)
      print(movies?[0].overview)
    }

Search for people by name.

    SearchMDB.person(apikey, query: "Brad Pitt", page: 1, includeAdult: true){
      data, person in
      print(person?[0].name)
      print(person?[0].known_for.movies?.count)
      print(person?[0].known_for.tvShows?.count)
    }

Search for TV shows by title.

     SearchMDB.tv(apikey, query: "Breaking Ba", page: 1, language: "en", first_air_date_year: nil){
      data, tvShows in
      print(tvShows?[0].name)
      print(tvShows?[0].overview)
      print(tvShows?[0].popularity)
    }
Clone this wiki locally