Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 872 Bytes

README.md

File metadata and controls

32 lines (19 loc) · 872 Bytes

Google API

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.

Install

meteor add percolate:google-api

Usage

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.

Contributions

Are welcome.

MIT license, (c) Percolate Studio, maintained by Tom Coleman (@tmeasday).