On the https://hessenergy.com website, there can be several profile values for a given customer login. These appear in the upper-left hand corner of the page under the Select Profile dropdown.
For some customer logins, there will only be a default profile and no dropdown will appear. In this case the module returns null
npm install -S hess-get-profile-values-for-login
var getProfileValuesForLogin = require('hess-get-profile-values-for-login')
var currentLogin = {
username: 'fooUsername',
password: 'barPassword'
}
getProfileValuesForLogin(currentLogin, function (err, reply) {
if (err) {
inspect(err, 'error getting profile values for login')
return
}
var values = reply.values
var jar = reply.jar
inspect(jar, 'authenticated cookie jar')
inspect(values, 'profile values')
})