Atlas 4 multiple content query

37 views
Skip to first unread message

Damo

unread,
May 4, 2015, 5:07:34 PM5/4/15
to atla...@googlegroups.com
Is it possible to retrieve combined content from one query to the content endpoint?  

For example, for 4 shows whose ids were pulled from a shedule call:
/4/content.json?id=dkrqnw,dkrqnx,dkrqpc,dkrqpb&type=item&annotations=description&source=pressassociation.com&key=[mykey]

Even though I'm going to cache the content it means I'd have to run a separate query for every single show I grabbed for a two week period.  It would run into thousands.  It's just for my own personal tv listings use that I use radiotimes for at the moment, but they don't have Spike and a few others.

And is it possible to grab series info in a combined call because currently I have to use the series id and a content call to find the total number of episodes.

I don't mind having to do all the calls but would be more than happy to know I'm doing it badly.

Thanks.

Chris Jackson

unread,
May 4, 2015, 5:50:52 PM5/4/15
to atla...@googlegroups.com
On 30 April 2015 at 22:29, Damo <pelvi...@googlemail.com> wrote:
Is it possible to retrieve combined content from one query to the content endpoint?  

For example, for 4 shows whose ids were pulled from a shedule call:
/4/content.json?id=dkrqnw,dkrqnx,dkrqpc,dkrqpb&type=item&annotations=description&source=pressassociation.com&key=[mykey]

Yes, that should work. Did you have trouble?
 
Even though I'm going to cache the content it means I'd have to run a separate query for every single show I grabbed for a two week period.  It would run into thousands.  It's just for my own personal tv listings use that I use radiotimes for at the moment, but they don't have Spike and a few others.

Do be careful though. Caching the data (except per the HTTP cache headers) is against our terms. 

And is it possible to grab series info in a combined call because currently I have to use the series id and a content call to find the total number of episodes.

Add the series_summary annotation for series info. Although this does not have the number of episodes in the series within PA data.


I don't mind having to do all the calls but would be more than happy to know I'm doing it badly.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Atlas" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlasapi+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Damo

unread,
May 4, 2015, 8:27:02 PM5/4/15
to atla...@googlegroups.com
Thanks for replying.

When I try to get mutiple items through content with a query like this:
/4/content.json?id=dkxddh,m94fh,rq7vb&type=series&source=pressassociation.com&annotations=description&key=[mykey]

I get the error:
{"message":"Wrong types for operator, lhs ContentType found ","error_code":"BAD_QUERY_ATTRIBUTE","error_id":"34bb9e29-c124-48fd-aceb-2dd31c47d0b5"}

Changing type from item to series or anything else gave the same result.

I did work out how to grab schedule info with show descriptions and the series summary in one call which took me a while because content_summary isn't listed on the API documentation.  This sped my code up a lot because now I can do one call for the schedule for a channel but still have to do multiple content grabs for any series ids provided.  If I can solve the multiple content id problem above that would only mean one other call which would be great.

Thanks again for the reply.
Reply all
Reply to author
Forward
0 new messages