downloading lineups

Discussion about Schedules Direct grabber code and data formats.
Post Reply
polymer
Posts: 2
Joined: Sat Sep 28, 2013 11:14 am

downloading lineups

Post by polymer » Sat Sep 28, 2013 1:15 pm

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?

polymer
Posts: 2
Joined: Sat Sep 28, 2013 11:14 am

Re: downloading lineups

Post by polymer » Sat Sep 28, 2013 10:44 pm

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.

rkulagow
SD Staff
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: downloading lineups

Post by rkulagow » Tue Oct 01, 2013 6:37 pm

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.

Post Reply