Page 1 of 1

downloading lineups

PostPosted: Sat Sep 28, 2013 1:15 pm
by polymer
I get a list of headends properly, and regardless of trying cable vs over-the-air lineups, it returns this.

Code: Select all
stdClass Object
(
    [response] => OK
    [code] => 200
    [serverID] => AWS-web.1
    [message] => file available at URL.
    [filename] => NY31534.headends.json.zip
    [URL] => https://s3.amazonaws.com/schedulesdirect/lineup/7edaf2af7fc9da11e37c7855de4cbec3.zip
    [datetime] => 2013-09-28T20:11:02Z
)


The URL download contains nothing more than the serverID in a Status.txt file.

I'm sending this:

{"action":"get","object":"lineups","api":20130512,"randhash":"d1818298afa91bc761187cc91180186c","request":["NY31534"]}

Am I doing something wrong, or is there a URL prefix I should be using the "NY31534.headends.json.zip" from?

Re: downloading lineups

PostPosted: Sat Sep 28, 2013 10:44 pm
by polymer
Since this was approved, I have figured out the issue.

I have the headends approved for the XML version on the site, but I didn't explicitly add them for the JSON API. You have to use the JSON:add endpoint first, check it with status, then try fetching. Then you'll find a folder within the zip file.

I started a PHP class to handle this/connections in the JSON API. I"ll post progress soon for anyone interested.

Re: downloading lineups

PostPosted: Tue Oct 01, 2013 6:37 pm
by rkulagow
I thought that I had made this explicit in the Wiki, but I'll make it more explicit in the next version of the docs.

Yes, the beta service and the existing XML service are two entities, so you need to add the headend first.