FIXED: Request for multiple lineups returns only one

FIXED: Request for multiple lineups returns only one

Postby cwchapma » Fri Mar 29, 2013 5:51 pm

When I give the request for lineups:

{"request":["0005410","0005972","PC:K2J1T2"],"randhash":"xxxxx","object":"lineups","action":"get","api":20130224}

I get only one lineup:

{"response":"OK","code":200,"serverID":"AWS-web.1","message":"file available at URL.","filename":"0005410.json.zip","URL":"https:\/\/s3.amazonaws.com\/schedulesdirect\/lineup\/fe1330899be43981c574392c95f0d3c7.zip","datetime":"2013-03-30T00:42:18Z"}

Am I missing something?

Clint
cwchapma
 
Posts: 42
Joined: Fri Mar 29, 2013 8:32 am

Re: Request for multiple lineups returns only one

Postby rkulagow » Mon Apr 15, 2013 12:00 pm

Bug introduced during the conversion to PDO. Let me take a look and I will fix it in 20130331.
rkulagow
SD Staff
 
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: Request for multiple lineups returns only one

Postby rkulagow » Mon Apr 15, 2013 4:30 pm

rkulagow wrote:Bug introduced during the conversion to PDO. Let me take a look and I will fix it in 20130331.


OK, since we're only returning a single response / URL, the easiest thing to do is to create another .zip file, with the headends within it. So the .zip file will become a generic "container", and inside of it will be the individual headends that were in the request.

Will that work?

The slightly more complicated way is for the response "message" field to become an array of responses, with each individual headend / URL specified as a separate message.

Which works better for the developers?
rkulagow
SD Staff
 
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: Request for multiple lineups returns only one

Postby cwchapma » Mon Apr 15, 2013 7:29 pm

I think I prefer the first option. It's more consistent with what happens now with the other commands. It's also the most flexible - if a developer only wants individual zip files, they can just ask for one at a time.

The advantage of the second option is the server wouldn't have to be zipping up different combinations all the time. It could just create the zips that don't already exist and give pointers to them. Presumably, they wouldn't change very often. The downside is you're forcing lots of smaller individual file transfers (not a big deal IMO).

The third option is just to change the command so you can only ask for one lineup/headend at a time. This has the same pros/cons as #2.

Honestly, I don't see a huge difference from a client point of view with any of these options as long as it's consistent. For example if you go with option #2 (pointers to multiple zips), I would make sure schedules work the same way (I believe schedules are currently using option #1).

My biggest issue is that it doesn't do what it says in the docs.

Hope that makes sense... not sure I've been all that clear...

Clint
cwchapma
 
Posts: 42
Joined: Fri Mar 29, 2013 8:32 am

Re: Request for multiple lineups returns only one

Postby cwchapma » Mon Apr 15, 2013 7:45 pm

Oops... posted to wrong thread. Post moved.
Last edited by cwchapma on Sat Apr 20, 2013 10:51 am, edited 1 time in total.
cwchapma
 
Posts: 42
Joined: Fri Mar 29, 2013 8:32 am

Re: Request for multiple lineups returns only one

Postby rkulagow » Tue Apr 16, 2013 9:01 pm

rkulagow wrote:Bug introduced during the conversion to PDO. Let me take a look and I will fix it in 20130331.

OK, since we're only returning a single response / URL, the easiest thing to do is to create another .zip file, with the headends within it. So the .zip file will become a generic "container", and inside of it will be the individual headends that were in the request.


I believe that returning multiple lineups in a single request should now work correctly. Please confirm on the beta server.
rkulagow
SD Staff
 
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: Request for multiple lineups returns only one

Postby cwchapma » Sat Apr 20, 2013 10:22 am

Yes, it looks good. Thanks Rob!

Clint
cwchapma
 
Posts: 42
Joined: Fri Mar 29, 2013 8:32 am


Return to Developer

Who is online

Users browsing this forum: No registered users and 3 guests

cron