index.js
function _hoverRequest (method, path, body, cb) {
        // Check if previously logged in
        if (_loggedin) return _hoverApiRequest(method, path, body, cb);

        // Issue login request with provided username / password
        r({
            uri: baseUrl + '/login',
            body: 'username=' + username + '&password=' + password,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        }, _rCallback(function (err) {
            if (err) return cb(err);

            // Note logged in / forward request
            _loggedin = true;
            _hoverApiRequest(method, path, body, cb);
        }));
    }
function _hoverRequest (method, path, body, cb) {
        // Check if previously logged in
        if (_loggedin) return _hoverApiRequest(method, path, body, cb);

        // Issue login request with provided username / password
        r({
            uri: baseUrl + '/login',
            body: 'username=' + username + '&password=' + password,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        }, _rCallback(function (err) {
            if (err) return cb(err);

            // Note logged in / forward request
            _loggedin = true;
            _hoverApiRequest(method, path, body, cb);
        }));
    }
function _hoverRequest ( method , path , body , cb ) { // Check if previously logged in if ( _loggedin ) return _hoverApiRequest ( method , path , body , cb ) ; // Issue login request with provided username / password r ( { uri : baseUrl + '/login' , body : 'username=' + username + '&password=' + password , headers : { 'Content-Type' : 'application/x-www-form-urlencoded' } } , _rCallback ( function ( err ) { if ( err ) return cb ( err ) ; // Note logged in / forward request _loggedin = true ; _hoverApiRequest ( method , path , body , cb ) ; } ) ) ; }
Proxy request to hover API. Will issue login request if not
previously generated.

@param {String} method
@param {String} path
@param {Function} cb
@api private
Proxy request to hover API . Will issue login request if not previously generated .