-
Notifications
You must be signed in to change notification settings - Fork 5
API 20141201 Program Response
Your code must be able to process UTF-8 characters.
The response may look like this:
{
"response": "PROGRAMID_QUEUED",
"code": 6001,
"serverID": "20141201.1",
"message": "Fetching programID:SH012423280000 Retry.",
"datetime": "2014-11-14T19:15:54Z"
}
If your program receives this response, it should retry, because a server-side fault occurred and a valid programID should have been available but wasn't, so the server will regenerate the JSON for this programID. This is a soft failure.
If the response looks like this:
{
"response": "INVALID_PROGRAMID",
"code": 6000,
"serverID": "20140530.1",
"message": "Invalid programID:ZZ01234567891234",
"datetime": "2014-11-14T19:17:54Z"
}
then the requested programID is invalid. This is a hard failure.
The rest of this document explains the fields contained in a valid JSON response.
programID: 14 characters. Mandatory.
titles: array containing program titles. Mandatory.
- title120: 120 character description of the program. Mandatory.
episodeTitle150: 150 character episode title. Optional.
-
descriptions: array containing descriptions of the program. Optional. description100: array containing short description of the program. The description contained will have a maximum of 100 characters. Optional.
-
description1000: array containing long description of the program. The description contained will have a maximum of 1000 characters. Optional. Consists of the following fields:
- descriptionLanguage. Mandatory.
- description: text containing description. Mandatory.
eventDetails: indicates the type of program. Optional. Sport programs will have the following additional information:
Fields:
- venue100: location of the event
- teams: array containing the teams that are playing. Optional.
- name - name of the team. Mandatory.
- "isHome" - boolean indicating this team is the home team. Optional.
- gameDate: YYYY-MM-DD. Optional.
originalAirDate: YYYY-MM-DD. Optional.
genres: array of genres this program falls under. Optional.
metadata: key / value array of metadata about the program. Optional. Consists of the following fields:
- key - string indicating who is providing the information. Example: "Tribune"
- value: array consisting of:
- season: string indicating the season number. Mandatory.
- episode: string indicating the episode number. Optional.
showType: what sort of program is this. Optional.
contentAdvisory: array of advisories about the program, such as adult situations, violence, etc. Optional.
contentRating: array consisting of various rating boards' ratings. Optional. Consists of the following fields:
- body: name of the rating body. Mandatory.
- code: The rating assigned. Dependent on the rating body. Mandatory.
movie: array of information specific to a movie type. Optional, and only found with "MV" programIDs. Consists of the following fields:
- year: YYYY. The year the movie was released. Optional.
- duration: Duration (in integer seconds). Optional.
- qualityRating: an array of ratings for the quality of the movie. Optional. Consists of the following fields:
- ratingsBody: string indicating whose opinion this is. Mandatory.
- rating: string indicating the rating. Mandatory.
- minRating: string indicating the lowest rating. Optional.
- maxRating: string indicating the highest rating. Optional.
- increment: string indicating the increment. Optional.
cast - array of cast members. Optional. Each cast member element consists of the following fields:
- personID: string for this person. Used to retrieve images. Optional.
- nameID: string for this person. Used to differentiate people that have various names, such as due to marriage, divorce, etc. Optional. Actors in adult movies will typically not have a personID or nameID.
- name: string indicating the person's name. Mandatory.
- role: string indicating what role this person had. Mandatory.
- characterName: string indicating the name of the character this person played. Optional.
- billingOrder: string indicating billing order. Mandatory.
crew - array of crew members. Optional. Follows the same pattern as "cast".
recommendations - array of programs similar to this one that you may also enjoy. Optional. Each recommendation element consists of the following fields:
- programID: programID of the recommendation. Mandatory.
- title120: string indicating the name of the similar program. Mandatory.
hasImageArtwork: boolean indicating that there are images available for this program. Optional.
md5: md5 hash value of the JSON. Mandatory.
{
"programID": "EP000000211626",
"titles": [
{
"title120": "20/20"
}
],
"eventDetails": {
"subType": "Series"
},
"descriptions": {
"description100": [
{
"descriptionLanguage": "en",
"description": "The former executive chef of former Gov. Bob McDonnell; a mechanic shares
secrets of auto-repair."
}
],
"description1000": [
{
"descriptionLanguage": "en",
"description": "The former executive chef of former Gov. Bob McDonnell; a mechanic shares secrets of auto-repair; exaggerating the benefits of cosmetics; Oscar Pistorius\" ex-girlfriend, Samantha Taylor; a barista talks about dealing with difficult customers."
}
]
},
"originalAirDate": "2014-09-12",
"genres": [
"Newsmagazine"
],
"episodeTitle150": "True Confessions",
"cast": [
{
"personId": "68086",
"nameId": "68086",
"name": "Elizabeth Vargas",
"role": "Anchor",
"billingOrder": "01"
},
{
"personId": "107069",
"nameId": "107069",
"name": "David Muir",
"role": "Anchor",
"billingOrder": "02"
}
],
"crew": [
{
"personId": "268307",
"nameId": "271888",
"name": "David Sloan",
"role": "Executive Producer",
"billingOrder": "01"
}
],
"showType": "Series",
"hasImageArtwork": true,
"md5": "PnGUTfyw98uZMuZmvnZupg"
}
{
"programID": "MV000001930000",
"titles": [
{
"title120": "Strategic Air Command"
}
],
"eventDetails": {
"subType": "Feature Film"
},
"descriptions": {
"description100": [
{
"descriptionLanguage": "en",
"description": "Ballplayer (James Stewart) with pregnant wife (June Allyson)
must fly bombers."
}
],
"description1000": [
{
"descriptionLanguage": "en",
"description": "Saga of the US Air Force special bomber unit during the Cold War era. A professional baseball player is recalled to military service because of the expert flying skills he acquired during World War II. Although the athlete and his wife are both reluctant to give up civilian life, both come to realize the importance of the defense mission. The film features spectacular aerial footage of big bombers on maneuvers."
}
]
},
"genres": [
"Adventure"
],
"contentRating": [
{
"body": "British Board of Film Classification",
"code": "U"
}
],
"movie": {
"year": "1955",
"duration": 6840,
"qualityRating": [
{
"ratingsBody": "Gracenote",
"rating": "3",
"minRating": "1",
"maxRating": "4",
"increment": ".5"
}
]
},
"cast": [
{
"personId": "29343",
"nameId": "29343",
"name": "James Stewart",
"role": "Actor",
"characterName": "Lt. Col. Robert `'Dutch'` Holland",
"billingOrder": "01"
},
{
"personId": "32",
"nameId": "32",
"name": "June Allyson",
"role": "Actor",
"characterName": "Sally Holland",
"billingOrder": "02"
},
{
"personId": "79660",
"nameId": "79660",
"name": "Frank Lovejoy",
"role": "Actor",
"characterName": "Gen. Ennis C. Hawkes",
"billingOrder": "03"
},
{
"personId": "7320",
"nameId": "7320",
"name": "Barry Sullivan",
"role": "Actor",
"characterName": "Lt. Col. Rocky Samford",
"billingOrder": "04"
},
{
"personId": "81806",
"nameId": "81806",
"name": "Bruce Bennett",
"role": "Actor",
"characterName": "Gen. Espy",
"billingOrder": "05"
},
{
"personId": "309418",
"nameId": "314095",
"name": "Rosemary DeCamp",
"role": "Actor",
"characterName": "Mrs. Thorne",
"billingOrder": "06"
}
],
"crew": [
{
"personId": "72149",
"nameId": "72149",
"name": "Anthony Mann",
"role": "Director",
"billingOrder": "01"
}
],
"showType": "Feature Film",
"recommendations": [
{
"programID": "MV000411500000",
"title120": "Legends of the Fall"
},
{
"programID": "MV000614850000",
"title120": "Saving Private Ryan"
},
{
"programID": "MV000068350000",
"title120": "Gallipoli"
}
],
"hasImageArtwork": true,
"md5": "CMJ/aWrYDkGEVoa9pH1F7g"
}