Can Mirror Api call an external web service?

1.1k views Asked by At

I want to develop an app with mirror api for the novel google glasses. Is it possible to call an external web service from the glassware? I have to use this web service to obtain the informations to display in the timeline cards.
If it is possible, how I can do it?

2

There are 2 answers

0
Tony Allevato On BEST ANSWER

You need to provide a web service that interacts with the user's timeline to insert cards, but you can interact with whatever other web services you want from within yours in order to get the data that you push. Something like this:

        insert timeline               get 3rd party
             cards                    data response
User's  <--------------  Your Mirror  <-------------  Third party
Glass   -------------->  web service  ------------->  web service
         subscribed                   make request
        notifications                 for 3rd party
         (menu items,                     data
          location)
0
Metablocks Corp On

The simple answer is YES.

You'll probably want to develop your Glassware using the Google Mirror API as a server-based web application. (This doesn't require you to run any code on Glass, instead your application is written in PHP, Java, Python, .NET or one of the other languages supported by the Mirror API and resides on a web/cloud server.)

Your web-based application can then make any sorts of web-based API calls to other external web services or APIs, retrieve data or information and then format and send this information to your Google Glass device. How you consume these 3rd party web-services depends on your choice of programming language, but pretty much all of these languages have support for consuming external web service via XML, REST, JSON or SOAP.