Google 阅读器中的多个标签/文件夹
我希望能够从用户 Google Reader 中的多个标签/文件夹中获取数据。
我知道如何做一个http://www.google.com/reader/atom/user/-/label/SOMELABEL
,但你会如何做两个、三个或十个呢?
I want to be able to grab data from multiple tags / folders in a users Google Reader.
I know how to do one http://www.google.com/reader/atom/user/-/label/SOMELABEL
but how would you do two or three or ten?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来您无法在一个请求中获取多个标签/文件夹。如果可行,您应该迭代不同的标签/文件夹并将它们聚合到您的应用程序中。
[编辑]
由于您似乎有大量需要查询的标签/文件夹列表,因此另一种方法是获取完整的条目列表,然后整理出用户想要的条目。看起来每个条目都有一个类别元素,它会告诉您与其关联的标签。这对于您的情况可能是可行的。
(来源:http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI< /a>)
(来源:http://www.google.com/ reader/atom/user/-/state/com.google/starred)
Doesn't look like you can get multiple tags/folders in one request. If it's feasible you should iterate over the different tags/folders and aggregate them in your application.
[edit]
Since it looks like you have a large list of tags/folders you need to query, an alternative is to get the full list of entries, then sort out the ones the user wants. It looks like each entry has a category element that will tell you what tag is associated with it. This might be feasible in your case.
(Source: http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI)
(Source: http://www.google.com/reader/atom/user/-/state/com.google/starred)
我认为您无法像您希望的那样获得汇总数据。如果您想一想,即使 Google 也允许您一次浏览一个文件夹或标签,并且不会聚合其中的子集。
您可以选择所有项目的列表(针对其每个可用状态)或特定标签/文件夹的列表。
I think you cannot get aggregated data as you hope to be able to. If you think about it, even Google lets you browse folders or tags one at a time, and do not aggregate a sub-set of them.
You can choose to have a list of all the items (for each one of their available statuses) or a list of a particular tag/folder.
您可以通过 2 个请求来完成。首先,您需要向
http://www.google.com/reader/stream/items/ids
执行GET
请求。它支持多个参数,例如s
(必需参数;要获取的流ID;可以定义多次)、n
(必需;要获取的项目数)r
用于排名(可选)/ids< 下的更多 /code> 部分)
然后你应该执行
POST
请求(这是因为可能有很多 id,因此请求可能会被切断)到http://www.google.com/reader/api/0/流/项目/内容
。必需的参数是i
,它保存提要项目标识符(可以定义多次)。这应该从多个提要返回数据(如为我返回的)。
You could do it in 2 requests. First you need to perform a
GET
request tohttp://www.google.com/reader/stream/items/ids
. It supports several parameters likes
(required parameter; stream id to fetch; may be defined more than one time),n
(required; number of items to fetch)r
for ranking (optional)/ids
section)And then you should perform a
POST
request (this is because there could be a lot of ids, and therefore the request could be cut off) tohttp://www.google.com/reader/api/0/stream/items/contents
. The required parameter isi
which holds the feed item identifier (could be defined more than once).This should return data from several feeds (as returned for me).