Newbie checking in here....a little introduction: I just became a member of SchedulesDirect a week ago. I am looking to fill some of my free time working on an Android app that uses this API to display lineup information (or perhaps more appropriately "schedules"), ala a TV guide. Basically, my TV comes OTA through an antenna and I want to be able to know what shows are on at a given time.
I just started hacking away at the new JSON API and I have run into a few roadblocks (with my HTTP request knowledge and knowledge of this API, heh).
1. I am unable to retrieve the headends that are tied to my account. I retrieve the randhash on the first call and then whenever I send the headends request, I get back an unrelated set of headends.
- Code: Select all
Request : {"action":"get","api":20130224,"randhash":"bf4de59ff7e7c0996cd5b529d3c3458a","object":"headends"}
Response: {"response":"OK","code":200,"serverID":"AWS-web.1","datetime":"2013-03-12T07:26:00Z","data":[{"headend":"0005986","name":"Shaw Direct","location":"Canada (East) Advanced"},{"headend":"0005995","name":"Shaw Direct","location":"Canada (East) Classic"},{"headend":"0009995","name":"Shaw Direct","location":"Canada (West) Advanced"},{"headend":"0009999","name":"Shaw Direct","location":"Canada (West) Classic"},{"headend":"0005993","name":"Bell TV","location":"Canada (East)"},{"headend":"0008999","name":"Bell TV","location":"Canada (West)"},{"headend":"FTA","name":"Free-to-air satellite","location":"Global"}]}
I currently have two headends configured to my account:
48103 Ann Arbor, US Comcast - Digital CableDigital
94117 San Francisco, US Local Broadcast Listings - Antenna LocalBroadcast
2. A separate problem I am having is that when I perform the lineups request for a given headend, the contents from the zip from the link in the "URL" field of this JSON response is empty. I have tried with
multiple headends with the same result. Each time the zip contains two text files, "Array.json.txt" and "serverID.txt". Array.json.txt is entirely empty. This is where the lineups should be in JSON, right?
- Code: Select all
Request: {"action":"get","api":20130224,"object":"programs","request":{"request":["PC:94117"]},"randhash":"bf4de59ff7e7c0996cd5b529d3c3458a"}
Response: {"response":"OK","code":200,"serverID":"AWS-web.1","message":"file available at URL.","filename":"programs.json.zip","URL":"https:\/\/s3.amazonaws.com\/schedulesdirect\/programs\/765fe086f690d9ba15cbcaf4dff2f3c6.zip","datetime":"2013-03-12T07:26:02Z"}
I'm creating proper requests to the best of my knowledge, but can't seem to get any lineup data back. Can anybody help diagnose my problem? I can provide any more information if need be.
I have been reviewing the perl script from the main github page, the JSONTV python grabber, and the sdjson Java grabber that interact with this API for pointers (which I think coincides with the three guys that have been posting in this forum lately...). Anyway, thanks for all of help so far. Once I get something basic up and running, I will be sure to put the project up on github.
-Brad