Google Mirror API documentation is open for developers

Ajay Ohri
Apr. 18 2013, 08:00AM EDT

The Google Mirror API allows you to build web-based services, called Glassware, that interact with Google Glass. It provides this functionality over a cloud-based API and does not require running code on Glass. We announced the Mirror API here.

The Google Mirror API documentation is now open on Google Developers . The quick start is open for two languages - Python and Java and code is also available on Github.

Here are some things you can do with the Google Mirror API-

  • Timeline- Your user's timeline is divided up into timeline items. You can use the API to insert and manage timeline items with REST operations over HTTP. To insert a timeline item, POST a JSON representation of a timeline item to the REST endpoint. Bundling allows you to combine many related cards into a bundle.
  • Subscriptions- The Mirror API allows you to subscribe to notifications that are sent when the user takes specific actions on a Timeline Item or when the user location has been updated. A notification from the Mirror API is sent as a POST request to the subscribed endpoint containing a JSON request body.
  • Locations- You can use the Mirror API to observe the user's location in timeline items, request their last known location directly, and subscribe to periodic location updates. You can also deliver pre-rendered map images in timeline cards by giving the Mirror API the coordinates to draw. The Google Mirror API can render maps for you and overlay markers and lines to signify important places and paths.
  • Contacts-Glassware only has access to the timeline items that it created. Contacts, combined with the SHARE built-in menu item, allow your users to share timeline items with other Glassware. To allow the user to share timeline items with your Glassware, insert a contact by POSTing a JSON representation of a contact to the insert REST endpoint. Once a contact has been inserted by your service, your user must enable it at MyGlass.
  • Authorization- Requests to the Google Mirror API must be authorized using OAuth 2.0 credentials. Code samples demonstrate exchanging an authorization code for an access token with offline access and storing the refresh token are available in Java, Python, PHP, .NET and Ruby.
  • Media Upload- The Google Mirror API allows you to insert an attachment when creating a new timeline item.

Applications for Google Glass are closed but you can join the waitlist here. It is quite an amazing hardware innovation as this video shows. You can also try it on the playground here.

Google has also released some guidelines for developers to design to deliver quick and pertinent information to users at the right time while not interfering with their lives.

The future is here, and it's just a (Google Mirror) API call away!

Ajay Ohri is the author of R for Business Analytics and likes to write on Enterprise ,Cloud and Statistical APIs with an emphasis on interviews. Follow Ajay on Google+ and connect on LinkedIn

Comments