非公式 API を使用して、Google リーダーでスター付きの記事のスターを削除する方法を知っている人はいますか?
私はこれを見つけましたが、うまくいきません:
http://www.niallkennedy.com/blog/2005/12/google-reader-api.html
Python の pyrfeed モジュールもそうではありません。毎回 IOError 例外が発生します。
非公式 API を使用して、Google リーダーでスター付きの記事のスターを削除する方法を知っている人はいますか?
私はこれを見つけましたが、うまくいきません:
http://www.niallkennedy.com/blog/2005/12/google-reader-api.html
Python の pyrfeed モジュールもそうではありません。毎回 IOError 例外が発生します。
使用してみてください:
r=user%2F[user ID]%2Fstate%2Fcom.google%2Fstarred
それ以外の
a=user%2F[user ID]%2Fstate%2Fcom.google%2Fstarred
編集タグを呼び出すとき。
私はこれのための Python コードを持っていません (私は Java を持っています) が、あなたがつまずいている問題は、あなたが使っている言語とはほとんど関係がありません。すべての詳細。私が行うリクエストを実行し、強調表示されている詳細の一部を確認して、それがあなたの問題であるかどうかを確認するだけです.
これを使用して、特定の投稿のスターを削除できます (必要な場合、このサービスは同時に複数のアイテムをサポートしていることに注意してください)。
String authToken = getGoogleAuthKey();
// I use Jsoup for the requests, but you can use anything you
// like - for jsoup you usually just need to include a jar
// into your java project
Document doc = Jsoup.connect("http://www.google.com/reader/api/0/edit-tag")
// this is important for permission - more details on how to get this ahead in the text
.header("Authorization", _AUTHPARAMS + authToken)
.data(
// you don't need the userid, the '-' will suffice
// "r" means remove. you can also use "a" to add
// you have lots of other options besides starred. e.g: read
"r", "user/-/state/com.google/starred",
"async", "true",
// the feed, but don't forget the beginning: feed/
"s", "feed/http://www.gizmodo.com/index.xml",
// there are 2 id formats, easy to convert - more info ahead in the text
"i", "tag:google.com,2005:reader/item/1a68fb395bcb6947",
// another token - this one for allow editing - more details on how to get this ahead in the text
"T", "//wF1kyvFPIe6JiyITNnMWdA"
)
// I also send my API key, but I don't think this is mandatory
.userAgent("[YOUR_APP_ID_GOES_HERE].apps.googleusercontent.com")
.timeout(10000)
// VERY IMPORTANT - don't forget the post! (using get() will not work)
.post();
いくつかの実装の詳細 (コメントで参照されているもの) については、この他の質問で私の回答を確認できます。
フィード内のスター付きアイテムをすべて一覧表示するには、 http://www.google.com/reader/api/0/stream/items/idsまたはhttp://www.google.com/reader/atom/userを使用できます///state/com.google/starred . これらの ID を使用して、星を削除するための上記の API を呼び出すことができます。
これらの最後の 2 つは、はるかに使いやすいです。API の詳細については、非公式の (ただし適切に構造化された) リソースで確認できます: http://www.chrisdadswell.co.uk/android-coding-example-authenticating-clientlogin-google-reader-api/、http:// code.google.com/p/pyrfeed/wiki/GoogleReaderAPI、http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2 _ _
それが役に立てば幸い!