GitXplorerGitXplorer
s

gcalendar

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
387cf4c8d6fafbde397001cb24630745b30804bc

0.1.6

ssailxjx committed 11 years ago
Unverified
372c261602652de2d8f8e92d3708b007062000b7

increase expire

ssailxjx committed 11 years ago
Unverified
d8f64eedeaa6b0202a6c96750a59827ed81942f6

0.1.5

ssailxjx committed 11 years ago
Unverified
f7d195c56d778951512538e073eb594d35ecbac0

update logger

ssailxjx committed 11 years ago
Unverified
bbee9dad923d957c276232073b64980d9215392b

0.1.4

ssailxjx committed 11 years ago
Unverified
72e27bf636fe12dd1dbb6ddf261f92f7d330539e

add logger

ssailxjx committed 11 years ago

README

The README file for this repository.

gcalendar

Google Calendar SDK

Example

Generate Auth Url

Gcalendar = require('gcalendar')

gcalendar = new Gcalendar
  client_id: 'xxxxxxxxxxxx.apps.googleusercontent.com'
  client_secret: 'xxxxxxxxxxxxxxxxx-yyyyyy'
  redirect_uri: 'http://you.redirect.url/google'

console.log gcalendar.generateAuthUrl()

Get Token

Gcalendar = require('gcalendar')

code = '4/X9GF6aiH7FbB6yyfOidNN48AQ-ng.gkT0lKE1kl0fXE-sT2ZLcbRPHy1khQI'  # important!

gcalendar = new Gcalendar
  client_id: 'xxxxxxxxxxxx.apps.googleusercontent.com'
  client_secret: 'xxxxxxxxxxxxxxxxx-yyyyyy'
  redirect_uri: 'http://you.redirect.url/google'

gcalendar.getToken code, (err, tokens) ->
  console.log tokens

Call Apis

Gcalendar = require('gcalendar')

gcalendar = new Gcalendar
  client_id: 'xxxxxxxxxxxx.apps.googleusercontent.com'
  client_secret: 'xxxxxxxxxxxxxxxxx-yyyyyy'
  redirect_uri: 'http://you.redirect.url/google'
  access_token: 'ya29.1.AADtN_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyy',
  refresh_token: '1/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'

gcalendar.api('events.list').arguments(
  calendarId: 'sailxjx@gmail.com'
).execute (err, eventList) ->
  console.log eventList

Google Api References