2

選択した単一のアイテムをGoogleリーダーAPIから取得しようとしています。IDでアイテムを取得するためにAPI呼び出しを行うことはできますか、それともそのアイテムフィードにアクセスしてそこから取得する必要がありますか?

4

1 に答える 1

8

入力としてi=を使用してhttp://www.google.com/reader/api/0/stream/items/contentsへのPOSTを使用できます(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に切り替えることができます。

于 2010-07-28T23:12:14.780 に答える