How to retrieve all starred items for one particular source?

Showing 1-4 of 4 messages
How to retrieve all starred items for one particular source? Dan Stark 7/12/11 5:59 AM
Hi all

I know how to retrieve all starred items for all items in one's
account

But my question is

how about for one particular source?

I know the xt parameter, but it is "exclude" and I don't know any
google-state as "unstarred".

Anyone can help?


Re: How to retrieve all starred items for one particular source? Mihai P. 7/12/11 6:59 PM
Hi Dan,

There is no direct way to do this. The most efficient way from the Reader backend's perspective is to compute the intersection using item IDs; something like:


Items that are both starred and in the passed in feed (http://googleblog.blogspot.com/atom.xml in this case) will have both streams in their directStreamIds:
{"id":"-54920593598378833","directStreamIds":["user/08173477664906626377/state/com.google/starred","feed/http://googleblog.blogspot.com/atom.xml"],"timestampUsec":"1310522203998795"}
Ones that are starred but not in the feed or vice-versa will only have one direct stream ID.

Once you have the collection of item IDs that interest you, you can fetch their contents using a request like http://www.google.com/reader/api/0/stream/items/contents?i=1386864356855952360&i=4747583500102276781.

These two pages explain more about how to use these API endpoints:

Mihai
Re: How to retrieve all starred items for one particular source? Dan Stark 7/13/11 2:26 AM
Hi mihai

Crystal clear. thanks

Dan
Re: How to retrieve all starred items for one particular source? Dan Stark 8/1/11 2:17 AM
Hi Mihai

Thanks for your post. I have tried your way, but I have some questions.

You suggested doing like this:


using StreamItemsIds to get items from both the feed and the starred label.

So the returning 1000 items are either from the feed or having the starred label or both. right?

If I have, say, 10K starred items. Because the n=1000, it might be the case that in the 1000 items, there are no starred items from the feed, because the starred items from the feed that I want are too old, right?

Also, another way might be better:

I just use /reader/api/0/stream/contents/<escaped StreamId> to get all starred items (up to 1000), then to see which items belong to the feed that I want. And I do it continuously using continuation to get the desired number of starred items from that feed.

right? 

Thanks

Dan

On Wed, Jul 13, 2011 at 2:59 AM, Mihai Parparita <mih...@google.com> wrote: