Skip to content

Instantly share code, notes, and snippets.

@dhd5076
Created December 13, 2018 13:28
Show Gist options
  • Save dhd5076/50180caf94649bed366df5e9f28bff62 to your computer and use it in GitHub Desktop.
Save dhd5076/50180caf94649bed366df5e9f28bff62 to your computer and use it in GitHub Desktop.
Fetch Dining Balance
var request = require('xhr-request')
module.exports.GetDiningBalance = function(cb) {
request('https://tigercenter.rit.edu/tigerCenterApp/login_shib/tc/dining-info', {
method: 'GET',
json: true,
headers: {
'Cookie': '[SESSION VARIABLES AND INFO HERE, E.G JSESSIONID=XXXXXX.....]'
}
}, function (err, data) {
if (err) throw err
if(cb) {
cb(data.customer.balances[1].food)
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment