Ejemplo n.º 1
0
import datetime
from datetime import date
import urllib2
import json
from PasswordManager import getcredentials
(_, apikey) = getcredentials('whartonapikey')

json_url = 'http://spike.wharton.upenn.edu/webservices/api/v0.1/gsrs/?apiKey=' + apikey
B_HUNTSMAN = 'Jon M. Huntsman Hall'
rooms = {'241': ('241', B_HUNTSMAN),
         '242': ('242', B_HUNTSMAN),
         '243': ('243', B_HUNTSMAN),
         '246': ('246', B_HUNTSMAN),
         '247': ('247', B_HUNTSMAN),
         '248': ('248', B_HUNTSMAN),
         '251': ('251', B_HUNTSMAN),
         '252': ('252', B_HUNTSMAN),
         '256': ('256', B_HUNTSMAN),
         '257': ('257', B_HUNTSMAN),
         '258': ('258', B_HUNTSMAN),
         '261': ('261', B_HUNTSMAN),
         '262': ('262', B_HUNTSMAN),
         '266': ('266', B_HUNTSMAN),
         '267': ('267', B_HUNTSMAN),
         '268': ('268', B_HUNTSMAN),
         '276': ('276', B_HUNTSMAN),
         '277': ('277', B_HUNTSMAN),
         '278': ('278', B_HUNTSMAN),
         '341': ('341', B_HUNTSMAN),
         '342': ('342', B_HUNTSMAN),
         '343': ('343', B_HUNTSMAN),