Skip to content

Collections

George Kye edited this page Oct 26, 2016 · 5 revisions
Required Parameters
api_key String! collectionId Int!
Optional Parameters
language(ISO 639-1 code) String!

Collection Information

Get the basic collection information for a specific collection id. You can get the ID needed for this method by making a /movie/{id} request and paying attention to the belongs_to_collection hash.

```swift CollectionMDB.collection(apikey, collectionId: 10, language: "en"){ data, collectionData in if let collectionData = collectionData{ print(collectionData.overview) print(collectionData.name) print(collectionData.collectionItems[0].original_title) print(collectionData.collectionItems[0].overview) } } ```

Collection Images

Get all of the images for a particular collection by collection id.

        CollectionMDB.collectionImages(apikey, collectionId: 10, language: "en"){
      data, collectionData in
      if let collectionData = collectionData{
        print(collectionData.posters[0].file_path)
        //print(data?.stills[0].file_path)
        print(collectionData.backdrops[0].file_path)
      }
    }
Clone this wiki locally