An API (python, javascript) to interact with Wharton Webservices.
>>> auth(username, password)
>>> get_token(username, password)
ABCDEFGHIJK123456
>>> get_locations(token)
[u'JMHH F', u'JMHH G', u'JMHH 2', u'JMHH 3', u'2401']
>>> get_reservations(token)
[
{
u'duration': 30,
u'reservationId': 1536217,
u'roomId': u'2401 813',
u'subjectLine': u'GSR Reservation',
u'startTime': datetime.datetime(2015, 11, 17, 10, 0)
}
]
>>> data = [{
u'duration': 30,
u'roomId': u'2401 813',
u'subjectLine': u'GSR Reservation',
u'startTime': datetime.datetime(2015, 11, 17, 11, 0)
}]
>>> create_reservations(token, data)
>>>
>>> reservation_ids = ['1536217']
>>> create_reservations(token, reservation_ids)
>>>
npm install whartonapi
var whartonapi = require('whartonapi');
whartonapi.auth('myusername', 'mypassword')
.then(function (response) {
if(response) {
// login was successful
} else {
// login failed
}
})