Skip to content

Node.js wrapper for the Google Contacts API (uses OAuth 2.0 token authentication)

Notifications You must be signed in to change notification settings

Art1Sec8/Meteor-Google-Contacts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor wrapper for the Google Contacts API.

Install

mrt add google-contacts

Usage

opts =
  email: userEmail
  consumerKey: googleId
  consumerSecret: googleSecret
  token: googleAccessToken
  refreshToken: googleRefreshToken

gcontacts = new GoogleContacts opts

gcontacts.refreshAccessToken opts.refreshToken, (err, accessToken) ->
  if err
    console.log 'gcontact.refreshToken, ', err
    return false
  else
    console.log 'gcontact.access token success!'
    gcontacts.token = accessToken
    gcontacts.getContacts (err, contacts) ->
      // Do what you want to do with contacts
      // console.log(contacts);

    gcontacts.getPhoto contact.photoUrl, (err, binaryData) ->
      // Save binaryData to you DB or file.

About

Node.js wrapper for the Google Contacts API (uses OAuth 2.0 token authentication)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%