Google Reader API

Source: Internet
Author: User

Google Reader is a feed aggregator built using a large amount of JavaScript. It can capture the latest feed data in a very timely manner. The data called by Google's Ajax front-end adopts the atom format. This data technology reduces the development difficulty of Google Reader and makes it easy for third-party applications to expand it.

Get feed

/Reader/atom/feed/

Google converts a feed to the atom FORMAT No matter what format it uses at the beginning. All RSS feeds contain all the elements that appear in the feed, which is similar to my Yahoo! The backend is different. Yahoo does not contain any additional metadata.

You can access any feed from Google Reader in the following format:

    • Http://www.google.com/reader/atom/feed/ + [feed address]

You can use the N parameter to returnArticleQuantity. The default value is 20.

Google ignores useless data in the reader, including namespaces (such as Apple iTunes podcast and Yahoo! Media RSS namespace), author information (such as email, home address, etc.), and even copyright.

Subscription List

/Reader/atom/user/[user id]/Pref/COM. Google/subscriptions

The feed subscription list of Google Reader contains the user's current subscription and deleted subscription. Each feed contains its address, release and update time, and user-tagged tags (if any ). The current subscription is classified into the read list status. By setting complete to true, you can also obtain the list of all feeds.

Here is the subscribe list of all accounts whose user IDs are 0 on Google Reader. I didn't subscribe to my own RSS feed, but tagged my atom feed. Whether or not the author is declared in the original feed, the author element in each listed feed is empty. Maybe Google plans to add the feed claim service, but even their own Google blog still has no additional author information.

Read list

/Reader/atom/user [user id]/State/COM. Google/reading-list

I like Google Reader's reading list function. It can directly access all unread articles in my subscribed feed and present them in a "News stream" way.

Here is an example of my reading list. You can also set the number of returned articles through the N parameter.

Read articles

Http://www.google.com/reader/atom/user/[user id]/State/COM. Google/read

You can use this API to obtain the articles you have read in Google Reader. This function is useful if you want to analyze the trend or query the 100 articles you have recently read. The number of returned articles can also be set with parameter n.

List of articles under a tag

/Reader/atom/user/[user id]/label/[tag]

You can also view the recently published articles under the specified tag. For example, if you mark a lot of feeds as "marketing" and want to access the feed related to marketing, this is very useful. The returned content contains read and unread articles. Read articles are classified as read (State/COM. Google/read). You can determine whether to hide them. The number of returned results can be determined by the N parameter.

Star document

/Reader/atom/user [user id]/State/COM. Google/starred

Google Reader allows users to refer to articles. These star articles include the feed address, tag, and release/update time. You can use parameter n to specify the number of returned results. The default value is 20.

Google regards the Star project as a special tag, so the output content is consistent with the document list structure under the tag.

Add or delete subscriptions

/Reader/API/0/edit-subtasks

Using the POST request to access the Google Reader API, you can add any feed to the subscription list of Google Reader.

  • /Reader/API/0/edit-subscribe -- Basic address
  • AC = ["subscribe" or "Unsubscribe"] -- request action
  • S = feed % 2f [feed url] -- request subscription
  • T = [command identifier] -- a time-sensitive identifier published by Google, which can be obtained through/Reader/API/0/token.

Add Tag

/Reader/API/0/edit-tag

You can tag a feed or a separate article through an http post request.

  • /Reader/API/0/edit-tag -- Basic address
  • S = feed % 2f [feed url] -- the feed address you want to tag
  • I = [item id] -- the ID of the article that appears in the feed. Optional. It is used to tag individual articles.
  • A = USER % 2f [user id] % 2 flabel % 2f [tag] -- request action, Add Tag to feed, article, or both.
  • A = USER % 2f [user id] % 2 fstate % 2fcom. Google % 2 fstarred -- star article.
  • T = [special scramble] -- information about users and new tags. It may be considered for security reasons and has not yet been made public.

Summary

You may build your own feed reader based on Google's requests for county officials. You can use Google as your background to create online and offlineProgramBy using Google's ID, you can also create more advanced features.

Google has established the first program on top of these data APIs-Google Reader. From the perspective of their choice of API addresses, Google Reader should not be the last program based on these datasets. I like opening up data calls. Google Reader's API is so simple. I believe it will guide Google and third-party developers to create more new applications!

References: http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.