Google+ API Released

Google released their API today…which means fun for everyone. I’m thinking a visualization of the globe chrome experiment with a real time (or near real time) update of public statuses. Hopefully, these little spikes will animate in as public statuses are read and then disappear. Should be fairly freaking badass.

A rundown on the API:

  • You need an API key to get restful access…
  • API comes true to form,RESTful HTTP with a JSON return…
  • API Client Libraries including, Java, Python, Ruby and PHP
  • Uses OAuth for all secure requests
  • Throttled at 1,000,000 queries / day / user
  • Most returns are defaulted to a max of 20 data objects
  • You can filter responses using the “fields” query (pared down response):
https://www.googleapis.com/plus/v1/activities/z12gtjhq3qn2xxl2o224exwiqruvtda0i?fields=url,object(content,attachments/url)&key=YOUR-API-KEY

A Brief example…

Let’s say I just want to get the last 20 “status” updates from a person on google+. Let’s also say I’m starting from scratch. I simply make a GET request to:

https://www.googleapis.com/plus/v1/people/{USER_ID}?pp=1&key={YOUR_API_KEY}

NOTE: If you get a “not found” message from google using the above URL, don’t despair…just update your API key and use a new one, everything should work swimmingly.

Where the USER_ID is the id of the user you are looking for and the API_KEY is your API Key you registered with your google profile. If you don’t know where to find the id of the user you’re looking for, simply visit his/her profile on g+ and grab it from the URL (as shown below).

Next:

In the next article, we’ll download the client library and begin doing something interesting with this information…

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.