Skip to content

Collections

George Kye edited this page Mar 12, 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"){ collectionData in let data = collectionData.data! print(data.overview) print(data.name) print(data.collectionItems[0].original_title) print(data.collectionItems[0].overview) } ```

Collection Images

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

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