Page 1 of 1

Program IDs morph when retrieving program descriptions

PostPosted: Tue Jun 27, 2017 5:22 pm
by skst
https://github.com/SchedulesDirect/JSON ... -a-program

You might want to consider improving the documentation. After a fair amount of debugging, I figured out that the program IDs are converted from EP in the request to SH in the response, and the last four characters are set to 0000. That's not clear at all from the documentation on the above-referenced page. It makes it unnecessarily messy to retrieve the descriptions. I get that SD doesn't want to return multiple descriptions for each program and, of course, a program ID is different for each episode, but you could return them so that the actual program ID could be used as a lookup key, or have the program send the modified ID in the request (so that the mutation must be explicitly understood), or document it so that we know what we're looking for in the response.

The doc says:
You may want to obtain the generic description of a program; this is only available for "EP" types.

and then:
The body of the request must contain the programIDs:

["EP000000060011","EP000186930001"]
Will return:

{
"SH000000060000": {
...
},
"SH000186930000": {
...
}
}