Created
December 13, 2018 13:28
-
-
Save dhd5076/50180caf94649bed366df5e9f28bff62 to your computer and use it in GitHub Desktop.
Fetch Dining Balance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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