我正在尝试从Google阅读器API中检索单个选定的项目。是否有我可以通过ID获取项目的api调用,或者我是否必须访问该项目Feed并从那里获取它?
答案 0 :(得分:8)
您可以使用POST来http://www.google.com/reader/api/0/stream/items/contents使用i =作为输入(您可以重复i =参数以获取多个项目内容)。
以下是curl调用示例:
$ curl -d "i=tag:google.com,2005:reader/item/1bab1bbe8a8ad82f" http://www.google.com/reader/api/0/stream/items/contents
{"direction":"ltr","id":"feed/http://googlereader.blogspot.com/atom.xml","title":"Official Google Reader Blog","description":"News, tips and tricks from the Google reader team.","self":[{"href":"http://www.google.com/reader/api/0/stream/items/contents"}],"alternate":[{"href":"http://googlereader.blogspot.com/","type":"text/html"}],"updated":1275437593,"items":[{"crawlTimeMsec":"1275437593933","id":"tag:google.com,2005:reader/item/1bab1bbe8a8ad82f","categories":[],"title":"Folder and tag renaming",
默认情况下输出格式为JSON,您可以添加output = atom参数将其切换为Atom。