hess-login

1.0.0 • Public • Published

Hess Energy Login

A module to login to the Hess Energy website using request. Upon successful login, a request cookie jar object is returned which can be used in subsequent requests

Installation

npm install -S git+ssh://git@bitbucket.org:competitiveenergy/hess-login.git

Usage

Call with an object that has username and password fields set. If the login is successful the second parameter of the callback will be the path to the authenticated cookie file on disk that can be used in subsequent requests

var hesLogin = require('hess-login')
// currentLogin is a customer login for the https://www.hessenergy.com/dashboard/unauthenticated.aspx website
var currentLogin = {
  username: 'fooUsername@gmail.com',
  password: 'barPassword'
}
hesLogin(currentLogin, function (err, jar) {
  if (err) {
    console.dir('error logging into hess energy website', err)
  }
  console.dir('logged into Hess Energy website correctly, current cookie jar', jar)
})

Tests

# install the development dependencies 
npm install
# run the tests 
npm test

Readme

Keywords

none

Package Sidebar

Install

npm i hess-login

Weekly Downloads

7

Version

1.0.0

License

BSD

Last publish

Collaborators

  • clewfirst