-
Notifications
You must be signed in to change notification settings - Fork 38
Credits
George Kye edited this page Oct 26, 2016
·
3 revisions
Get the detailed information about a particular credit record. This is currently only supported with the new credit model found in TV. These ids can be found from any TV credit response as well as the tv_credits
and combined_credits
methods for people.
The episodes object returns a list of episodes and are generally going to be guest stars. The season array will return a list of season numbers. Season credits are credits that were marked with the "add to every season" option in the editing interface and are assumed to be "season regulars".
CreditsMDB.credits(apikey, creditID: "5256c98419c2956ff604fd2c", language: "en"){
clientReturn, credits in
if let credit = credits{
if(credit.media.episodes.count > 0){
print(credit.media.episodes[0].overview)
print(credit.media.episodes[0].season_number)
print(credit.media.episodes[0].air_date)
}
if(credit.media.seasons.count > 0){
print(credit.media.seasons[0].season_number)
print(credit.media.seasons[0].poster_path)
print(credit.media.seasons[0].air_date)
}
print(credit.media_Type)
print(credit.department)
print(credit.job)
print(credit.id)
print(credit.person.name)
}
}