-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.py
More file actions
executable file
·32 lines (27 loc) · 796 Bytes
/
auth.py
File metadata and controls
executable file
·32 lines (27 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
"""
Authenticate against Google's Calendar APIs. This requires that you
download and install
http://gdata-python-client.googlecode.com/files/gdata.py-1.2.4.tar.gz
or something quite similar.
"""
from __future__ import with_statement
__author__ = ""
__version__ = "$Id$"
from xml.etree import ElementTree
import atom
import atom.service
import gdata.calendar
import gdata.calendar.service
import gdata.service
import getopt
import string
import sys
import time
def auth(email, password):
calendar_service = gdata.calendar.service.CalendarService()
calendar_service.email = email
calendar_service.password = password
calendar_service.source = "eric.hanchrow-gcaldeduplicator-version0"
calendar_service.ProgrammaticLogin()
return calendar_service