Google Contacts API client for Node.js.
var GoogleContacts = require('gcontacts-api');
var gContacts = new GoogleContacts({
clientId: '####-####.apps.googleusercontent.com',
clientSecret: '###-###',
redirectUrl: 'http://www.mywebsite.com/oauth2callback'
});
var url = gContacts.getAuthUrl();
// redirect user to authorization URL and acquire oAuth access token
gContacts.authorize(token)
.then(function () {
return gContacts.getContacts();
})
.then(function (contacts) {
// do something with contacts
})
.catch(function (err) {
console.error(err);
});
For further information on how to use this library please refer to the wiki.
- OAuth authorization;
- Basic CRUD functionality;
- Promise and callback API.
$ npm install gcontacts-api
- Node.js 0.8+*
Source code contributions are most welcome. The following rules apply:
- JavaScript source code needs to follow the Airbnb Style Guide;
- Functions need to be well documented;
- Unit tests are obligatory.
If you are having issues with this library, please let us know.
- Issue Tracker: github.com/controlly/gcontacts-api/issues
The project is licensed under the MIT license.