A Meteor library to interact with Google's API.
Works with accounts-google to automatically handle refresh/access token changes and give you a simple API to make calls.
meteor add percolate:google-api
To call the library, use the get()
and post()
functions:
GoogleApi.get('/your/api/path', options, callback);
If callback
is provided (client or server), the call will be made asynchronously.
On the client, if you do not provide a callback, the library will return a Q promise. On the server, it will run synchronously.
If the user's access token has expired, it will transparently call the exchangeRefreshToken
method to get a new refresh token.
Are welcome.