percolate:google-api

v1.0.1Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

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.