blob: 4a40bd615e7ca362f636a8fdcd49ca27cb2f0590 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# vim: set filencoding=utf8
"""
Calendar WSGI App
@author: Mike Crute (mcrute@ag.com)
@organization: SoftGroup Interactive, Inc.
@date: February 15, 2010
"""
from exchange.commands import FetchCalendar
from exchange.authenticators import CookieSession
class CalendarApp(object):
def __init__(self, exchange_server, user, password):
self.session = CookieSession(exchange_server,
username=user, password=password)
def __call__(self, environ, start_response):
start_response('200 OK', [])
command = FetchCalendar(self.session)
calendar = command.execute()
return calendar.as_string()
|