lib/github3.js
function(opts){
  //defaults
  opts = opts || {};
  this.username           = opts.username    || '';
  this.password           = opts.password    || '';
  // oAuth Token
  this.accessToken        = opts.accessToken || '';
  // API Rate Limit Details
  this.rateLimit          = 5000;
  this.rateLimitRemaining = this.rateLimit;  //rateLimitRemaining starts as rateLimit
}
function(opts){
  //defaults
  opts = opts || {};
  this.username           = opts.username    || '';
  this.password           = opts.password    || '';
  // oAuth Token
  this.accessToken        = opts.accessToken || '';
  // API Rate Limit Details
  this.rateLimit          = 5000;
  this.rateLimitRemaining = this.rateLimit;  //rateLimitRemaining starts as rateLimit
}
function ( opts ) { //defaults opts = opts || { } ; this . username = opts . username || '' ; this . password = opts . password || '' ; // oAuth Token this . accessToken = opts . accessToken || '' ; // API Rate Limit Details this . rateLimit = 5000 ; this . rateLimitRemaining = this . rateLimit ; //rateLimitRemaining starts as rateLimit }
Sets credentials for GitHub access.
@class Github3
@constructor
@param {Object} opts
{String} .username GitHub username
{String} .password GitHub password
{Token } .accessToken GitHub oAuth Token
Sets credentials for GitHub access .