Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
495 views
in Technique[技术] by (71.8m points)

rss - Google Reader API?

Is there any Google Reader API that I can plug in to? I building a clean RSS/Atom reader in PHP and would love to get all the goodies from Google Reader like the history of a feed, able to add comments to each feed item, etc.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I've built some google reader integration in python but I can share some of the api knowledge so you can get started. output=json is also available for all.

Login: https www.google.com/accounts/ClientLogin

POST &email=email&passwd=password&service=reader&source=appname&continue=http://www.google.com

from the response grab Auth=

Next hit: www.google.com/reader/api/0/token

HEADER Authorization=GoogleLogin auth=$Auth

That response becomes $token for the session.

From there it's just hitting some url's always passing that auth header and including the token in the querystring or post.

Gets a list of your subscriptions: www.google.com/reader/api/0/subscription/list?output=xml

To modify subscriptions this is the base url plus some post data for the action to perform

www.google.com/reader/api/0/subscription/edit?pos=0&client=$source

POST to add: s=$streams&t=$title&T=$token&ac=subscribe

POST to remove: s=$stream&T=$token&ac=unsubscribe

The $stream is generally feed/$feedurl like this for techcrunch, feed/http:// feeds.feedburner.com/Techcrunch

Sorry had to mangle some of the urls cause i don't have enough rep yet.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...