sprinter.js
function Sprinter(username, password, repoSlugs, cache) {
    if (! username) {
        throw new Error('Missing username.');
    }
    if (! password) {
        throw new Error('Missing password.');
    }
    if (! repoSlugs) {
        throw new Error('Missing repositories.');
    }
    this.username = username;
    this.password = password;
    // Verify required configuration elements.
    this.repos = convertSlugsToObjects(repoSlugs);
    this.gh = new GitHubApi({
        version: '3.0.0'
      , timeout: 5000
    });
    this.gh.authenticate({
        type: 'basic'
      , username: this.username
      , password: this.password
    });
    this._CACHE = {};
    this.setCacheDuration(cache);
    this._setupCaching();
}
function Sprinter(username, password, repoSlugs, cache) {
    if (! username) {
        throw new Error('Missing username.');
    }
    if (! password) {
        throw new Error('Missing password.');
    }
    if (! repoSlugs) {
        throw new Error('Missing repositories.');
    }
    this.username = username;
    this.password = password;
    // Verify required configuration elements.
    this.repos = convertSlugsToObjects(repoSlugs);
    this.gh = new GitHubApi({
        version: '3.0.0'
      , timeout: 5000
    });
    this.gh.authenticate({
        type: 'basic'
      , username: this.username
      , password: this.password
    });
    this._CACHE = {};
    this.setCacheDuration(cache);
    this._setupCaching();
}
function Sprinter ( username , password , repoSlugs , cache ) { if ( ! username ) { throw new Error ( 'Missing username.' ) ; } if ( ! password ) { throw new Error ( 'Missing password.' ) ; } if ( ! repoSlugs ) { throw new Error ( 'Missing repositories.' ) ; } this . username = username ; this . password = password ; // Verify required configuration elements. this . repos = convertSlugsToObjects ( repoSlugs ) ; this . gh = new GitHubApi ( { version : '3.0.0' , timeout : 5000 } ) ; this . gh . authenticate ( { type : 'basic' , username : this . username , password : this . password } ) ; this . _CACHE = { } ; this . setCacheDuration ( cache ) ; this . _setupCaching ( ) ; }
Wrapper class around the GitHub API client, providing some authentication
convenience and additional utility functions for executing operations across
the issue trackers of several repositories at once.
@param username {string} GitHub username credential for authentication.
@param password {string} GitHub password credential for authentication.
@param repoSlugs {string[]} List of repository slug strings to operate upon.
@param cache {int} How many seconds to cache fetched results. Default is 0.
Wrapper class around the GitHub API client providing some authentication convenience and additional utility functions for executing operations across the issue trackers of several repositories at once .