lib/rescuetime.js
function Rescuetime(apiKey, options) {

    // The api key is required
    if (!apiKey) {
        throw new RescuetimeError('Invalid API Key: ' + apiKey);
    }

    // Copy over the relavant data
    this.apiKey = apiKey;

    // Extend the defaults
    this.options = _.defaults(options || {}, Rescuetime.defaultOptions);

    // Contruct the endpoint with the correct auth from the appId and apiKey
    this.endpoint = this.options.endpoint;
}
function Rescuetime(apiKey, options) {

    // The api key is required
    if (!apiKey) {
        throw new RescuetimeError('Invalid API Key: ' + apiKey);
    }

    // Copy over the relavant data
    this.apiKey = apiKey;

    // Extend the defaults
    this.options = _.defaults(options || {}, Rescuetime.defaultOptions);

    // Contruct the endpoint with the correct auth from the appId and apiKey
    this.endpoint = this.options.endpoint;
}
function Rescuetime ( apiKey , options ) { // The api key is required if ( ! apiKey ) { throw new RescuetimeError ( 'Invalid API Key: ' + apiKey ) ; } // Copy over the relavant data this . apiKey = apiKey ; // Extend the defaults this . options = _ . defaults ( options || { } , Rescuetime . defaultOptions ) ; // Contruct the endpoint with the correct auth from the appId and apiKey this . endpoint = this . options . endpoint ; }
Rescuetime constructor.

@param {String} apiKey - your api key
@param {Object} options - an options object

@api public
Rescuetime constructor .