Thursday, September 15, 2011

Data: Getting started on the Google+ API

Just public data. 

Getting started on the Google+ API

By Chris Chabot, Google+ Developer Relations

Cross-posted with the Google+ Platform Blog

The Google+ project brings the nuance and richness of real-life sharing to software. The Google+ platform brings that nuance and richness to all of the web. We started with Google’s own products, added the +1 button for site owners and content publishers, and introduced games from a handful of partners. That’s just the beginning though — we want every one of you who builds applications to be able to include rich sharing, identity, and conversations in your app. Today, we’re taking the next step on that journey by launching the first of the Google+ APIs.

Let's Go Public

Google+ gives users full control over their information, supporting everything from intimate conversations with family to public showcases and debates. This initial API release is focused on public data only — it lets you read information that people have shared publicly on Google+. For example, if you want to get my profile information, you can use the people.get method by sending the following HTTP request:

GET https://www.googleapis.com/plus/v1/people/108189587050871927619?key=yourAPIKey

which returns the following JSON encoded output (excerpted for brevity):

{ "kind": "plus#person", "id": "108189587050871927619", "displayName": "Chris Chabot", "image": { "url": "https://lh5.googleusercontent.com/-cQNLOQzkGpE/AAAAAAAAAAI/AAAAAAAAEjo/M9_pXL-ra4Q/photo.jpg" }, "organizations": [ { "name": "Google+ Developer Relations", "title": "Developer Advocate & Manager", "type": "work" } ]}
Similarly, you can get a list of my most recent public posts by using the activities.list method:

GET https://www.googleapis.com/plus/v1/people/108189587050871927619/activities/public?key=yourAPIKey

Sent from my iPhone

0 comments: