2591
evergreencal
al_Event(object):
'''Access and create events in Google Calendar and link with
Evernote notes representing actions with due dates.'''
def __init__(self):
FLAGS = gflags.FLAGS
FLOW = OAuth2WebServerFlow(
client_id=GC_CLIENT_ID,
client_secret=GC_CLIENT_SECRET,
scope=GC_SCOPE,
user_agent=GC_USER_AGENT)
# We need to disable it for an installed app
FLAGS.auth_local_webserver = False
# Read credentials if available
storage = Storage('calendar.dat')
credentials = storage.get()
if credentials is None or credentials.invalid == True:
credentials = run(FLOW, storage)
# Create an httplib2.Http object to handle our HTTP requests
# and authorize it with our good Credentials.
http = httplib2.Http()
http = credentials.authorize(http)
# Build a service object for interacting with the API
self.service = build(serviceName='calendar',
version='v3',
http=htt
9 weeks ago
« earlier      

Copy this bookmark:



description:


tags: