octonode
Advanced tools
Comparing version 0.6.16 to 0.6.17
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var octonode; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
@@ -39,3 +39,3 @@ var auth, qs, randomstring, request, url; | ||
}; | ||
options.url.auth = "" + this.options.username + ":" + this.options.password; | ||
options.url.auth = this.options.username + ":" + this.options.password; | ||
return request(options, function(err, res, body) { | ||
@@ -71,3 +71,3 @@ if ((err != null) || res.statusCode !== 204) { | ||
}; | ||
options.url.auth = "" + this.options.username + ":" + this.options.password; | ||
options.url.auth = this.options.username + ":" + this.options.password; | ||
if (this.options.otp) { | ||
@@ -74,0 +74,0 @@ options.headers['X-GitHub-OTP'] = this.options.otp; |
@@ -1,8 +0,8 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Client, Gist, HttpError, Issue, Label, Me, Milestone, Org, Pr, Repo, Search, Team, User, extend, request, url, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
__slice = [].slice; | ||
extend1 = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
hasProp = {}.hasOwnProperty, | ||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
slice = [].slice; | ||
@@ -37,9 +37,10 @@ request = require('request'); | ||
HttpError = (function(_super) { | ||
__extends(HttpError, _super); | ||
HttpError = (function(superClass) { | ||
extend1(HttpError, superClass); | ||
function HttpError(message, statusCode, headers) { | ||
function HttpError(message, statusCode, headers, body1) { | ||
this.message = message; | ||
this.statusCode = statusCode; | ||
this.headers = headers; | ||
this.body = body1; | ||
} | ||
@@ -52,7 +53,7 @@ | ||
Client = (function() { | ||
function Client(token, options) { | ||
this.token = token; | ||
this.options = options; | ||
this.limit = __bind(this.limit, this); | ||
this.requestOptions = __bind(this.requestOptions, this); | ||
function Client(token1, options1) { | ||
this.token = token1; | ||
this.options = options1; | ||
this.limit = bind(this.limit, this); | ||
this.requestOptions = bind(this.requestOptions, this); | ||
this.request = this.options && this.options.request || request; | ||
@@ -62,4 +63,3 @@ this.requestDefaults = { | ||
'User-Agent': 'octonode/0.3 (https://github.com/pksunkara/octonode) terminal/0.0' | ||
}, | ||
proxy: process.env.HTTP_PROXY | ||
} | ||
}; | ||
@@ -117,3 +117,3 @@ } | ||
Client.prototype.buildUrl = function(path, pageOrQuery, per_page) { | ||
var q, query, separator, _url; | ||
var _url, q, query, separator; | ||
if (path == null) { | ||
@@ -158,3 +158,3 @@ path = '/'; | ||
protocol: this.options && this.options.protocol || "https:", | ||
auth: this.token && this.token.username && this.token.password ? "" + this.token.username + ":" + this.token.password : '', | ||
auth: this.token && this.token.username && this.token.password ? this.token.username + ":" + this.token.password : '', | ||
hostname: this.options && this.options.hostname || "api.github.com", | ||
@@ -166,3 +166,3 @@ port: this.options && this.options.port, | ||
if (q) { | ||
_url += "" + separator + "q=" + q; | ||
_url += separator + "q=" + q; | ||
query.q = q; | ||
@@ -174,3 +174,3 @@ } | ||
Client.prototype.errorHandle = function(res, body, callback) { | ||
var err, _ref; | ||
var err, ref; | ||
if (Math.floor(res.statusCode / 100) === 5) { | ||
@@ -187,4 +187,4 @@ return callback(new HttpError('Error ' + res.statusCode, res.statusCode, res.headers)); | ||
} | ||
if (body.message && ((_ref = res.statusCode) === 400 || _ref === 401 || _ref === 403 || _ref === 404 || _ref === 410 || _ref === 422)) { | ||
return callback(new HttpError(body.message, res.statusCode, res.headers)); | ||
if (body.message && ((ref = res.statusCode) === 400 || ref === 401 || ref === 403 || ref === 404 || ref === 410 || ref === 422)) { | ||
return callback(new HttpError(body.message, res.statusCode, res.headers, body)); | ||
} | ||
@@ -195,6 +195,6 @@ return callback(null, res.statusCode, body, res.headers); | ||
Client.prototype.get = function() { | ||
var callback, params, path, _i; | ||
path = arguments[0], params = 3 <= arguments.length ? __slice.call(arguments, 1, _i = arguments.length - 1) : (_i = 1, []), callback = arguments[_i++]; | ||
var callback, i, params, path; | ||
path = arguments[0], params = 3 <= arguments.length ? slice.call(arguments, 1, i = arguments.length - 1) : (i = 1, []), callback = arguments[i++]; | ||
return this.request(this.requestOptions({ | ||
uri: this.buildUrl.apply(this, [path].concat(__slice.call(params))), | ||
uri: this.buildUrl.apply(this, [path].concat(slice.call(params))), | ||
method: 'GET' | ||
@@ -212,6 +212,6 @@ }), (function(_this) { | ||
Client.prototype.getNoFollow = function() { | ||
var callback, params, path, _i; | ||
path = arguments[0], params = 3 <= arguments.length ? __slice.call(arguments, 1, _i = arguments.length - 1) : (_i = 1, []), callback = arguments[_i++]; | ||
var callback, i, params, path; | ||
path = arguments[0], params = 3 <= arguments.length ? slice.call(arguments, 1, i = arguments.length - 1) : (i = 1, []), callback = arguments[i++]; | ||
return this.request(this.requestOptions({ | ||
uri: this.buildUrl.apply(this, [path].concat(__slice.call(params))), | ||
uri: this.buildUrl.apply(this, [path].concat(slice.call(params))), | ||
method: 'GET', | ||
@@ -230,6 +230,6 @@ followRedirect: false | ||
Client.prototype.getOptions = function() { | ||
var callback, options, params, path, _i; | ||
path = arguments[0], options = arguments[1], params = 4 <= arguments.length ? __slice.call(arguments, 2, _i = arguments.length - 1) : (_i = 2, []), callback = arguments[_i++]; | ||
var callback, i, options, params, path; | ||
path = arguments[0], options = arguments[1], params = 4 <= arguments.length ? slice.call(arguments, 2, i = arguments.length - 1) : (i = 2, []), callback = arguments[i++]; | ||
return this.request(this.requestOptions({ | ||
uri: this.buildUrl.apply(this, [path].concat(__slice.call(params))), | ||
uri: this.buildUrl.apply(this, [path].concat(slice.call(params))), | ||
method: 'GET' | ||
@@ -337,3 +337,3 @@ }, options), (function(_this) { | ||
var credentials, token; | ||
token = arguments[0], credentials = 2 <= arguments.length ? __slice.call(arguments, 1) : []; | ||
token = arguments[0], credentials = 2 <= arguments.length ? slice.call(arguments, 1) : []; | ||
return (function(func, args, ctor) { | ||
@@ -343,5 +343,5 @@ ctor.prototype = func.prototype; | ||
return Object(result) === result ? result : child; | ||
})(Client, [token].concat(__slice.call(credentials)), function(){}); | ||
})(Client, [token].concat(slice.call(credentials)), function(){}); | ||
}; | ||
}).call(this); |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Gist, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -12,5 +12,5 @@ Gist = (function() { | ||
Gist.prototype.list = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/gists"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/gists"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -28,5 +28,5 @@ return cb(err); | ||
Gist.prototype["public"] = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/gists/public"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/gists/public"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -44,5 +44,5 @@ return cb(err); | ||
Gist.prototype.starred = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/gists/starred"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/gists/starred"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -60,5 +60,5 @@ return cb(err); | ||
Gist.prototype.user = function() { | ||
var cb, params, user, _i, _ref; | ||
params = 3 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 2) : (_i = 0, []), user = arguments[_i++], cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/users/" + user + "/gists"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref, user; | ||
params = 3 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 2) : (i = 0, []), user = arguments[i++], cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/users/" + user + "/gists"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -65,0 +65,0 @@ return cb(err); |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Issue, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -40,5 +40,5 @@ Issue = (function() { | ||
Issue.prototype.comments = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.repo + "/issues/" + this.number + "/comments"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/repos/" + this.repo + "/issues/" + this.number + "/comments"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -45,0 +45,0 @@ return cb(err); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var Label; |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Me, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -106,5 +106,5 @@ Me = (function() { | ||
Me.prototype.followers = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ['/user/followers'].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ['/user/followers'].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -169,5 +169,5 @@ return cb(err); | ||
Me.prototype.starred = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ['/user/starred'].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ['/user/starred'].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -214,5 +214,5 @@ return cb(err); | ||
Me.prototype.watched = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ['/user/subscriptions'].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ['/user/subscriptions'].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -307,5 +307,5 @@ return cb(err); | ||
Me.prototype.orgs = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/user/orgs"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/user/orgs"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -331,5 +331,5 @@ return cb(err); | ||
Me.prototype.repos = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/user/repos"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/user/repos"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -436,2 +436,17 @@ return cb(err); | ||
Me.prototype.issues = function() { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/user/issues"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
return cb(err); | ||
} | ||
if (s !== 200) { | ||
return cb(new Error("User issues error")); | ||
} else { | ||
return cb(null, b, h); | ||
} | ||
}])); | ||
}; | ||
return Me; | ||
@@ -438,0 +453,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var Milestone; |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Org, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -42,3 +42,3 @@ Org = (function() { | ||
} else { | ||
return this.client.repo("" + this.name + "/" + nameOrRepo); | ||
return this.client.repo(this.name + "/" + nameOrRepo); | ||
} | ||
@@ -48,5 +48,5 @@ }; | ||
Org.prototype.repos = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/orgs/" + this.name + "/repos"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/orgs/" + this.name + "/repos"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -77,5 +77,5 @@ return cb(err); | ||
Org.prototype.teams = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/orgs/" + this.name + "/teams"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/orgs/" + this.name + "/teams"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -93,5 +93,5 @@ return cb(err); | ||
Org.prototype.members = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/orgs/" + this.name + "/members"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/orgs/" + this.name + "/members"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -162,3 +162,3 @@ return cb(err); | ||
if (s !== 201) { | ||
return cb(new Error("Org addTeamRepo error")); | ||
return cb(new Error('Org addTeamRepo error')); | ||
} else { | ||
@@ -165,0 +165,0 @@ return cb(null, b, h); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var Pr; |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Repo, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -53,5 +53,5 @@ Repo = (function() { | ||
Repo.prototype.commits = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/commits"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/commits"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -148,5 +148,5 @@ return cb(err); | ||
Repo.prototype.contributors = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/contributors"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/contributors"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -177,5 +177,5 @@ return cb(err); | ||
Repo.prototype.branches = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/branches"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/branches"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -214,5 +214,5 @@ return cb(err); | ||
Repo.prototype.issues = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/issues"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/issues"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -251,5 +251,5 @@ return cb(err); | ||
Repo.prototype.milestones = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/milestones"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/milestones"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -288,5 +288,5 @@ return cb(err); | ||
Repo.prototype.labels = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/labels"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/labels"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -451,5 +451,5 @@ return cb(err); | ||
Repo.prototype.forks = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/forks"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/forks"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -603,5 +603,5 @@ return cb(err); | ||
Repo.prototype.prs = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/pulls"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/pulls"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -684,5 +684,5 @@ return cb(err); | ||
Repo.prototype.stargazers = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/repos/" + this.name + "/stargazers"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref1; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref1 = this.client).get.apply(ref1, ["/repos/" + this.name + "/stargazers"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -689,0 +689,0 @@ return cb(err); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var Search; |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var Team, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -26,5 +26,5 @@ Team = (function() { | ||
Team.prototype.members = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/teams/" + this.id + "/members"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/teams/" + this.id + "/members"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -69,5 +69,5 @@ return cb(err); | ||
Team.prototype.repos = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/teams/" + this.id + "/repos"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/teams/" + this.id + "/repos"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -74,0 +74,0 @@ return cb(err); |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.8.0 | ||
// Generated by CoffeeScript 1.9.2 | ||
(function() { | ||
var User, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -34,5 +34,5 @@ User = (function() { | ||
User.prototype.followers = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/users/" + this.login + "/followers"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/users/" + this.login + "/followers"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -50,5 +50,5 @@ return cb(err); | ||
User.prototype.following = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/users/" + this.login + "/following"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/users/" + this.login + "/following"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -66,5 +66,5 @@ return cb(err); | ||
User.prototype.repos = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/users/" + this.login + "/repos"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/users/" + this.login + "/repos"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -82,4 +82,4 @@ return cb(err); | ||
User.prototype.events = function() { | ||
var cb, events, params, _i, _ref; | ||
params = 3 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 2) : (_i = 0, []), events = arguments[_i++], cb = arguments[_i++]; | ||
var cb, events, i, params, ref; | ||
params = 3 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 2) : (i = 0, []), events = arguments[i++], cb = arguments[i++]; | ||
if (!cb && typeof events === 'function') { | ||
@@ -96,3 +96,3 @@ cb = events; | ||
} | ||
return (_ref = this.client).get.apply(_ref, ["/users/" + this.login + "/events"].concat(__slice.call(params), [function(err, s, b, h) { | ||
return (ref = this.client).get.apply(ref, ["/users/" + this.login + "/events"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -114,5 +114,5 @@ return cb(err); | ||
User.prototype.orgs = function() { | ||
var cb, params, _i, _ref; | ||
params = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), cb = arguments[_i++]; | ||
return (_ref = this.client).get.apply(_ref, ["/users/" + this.login + "/orgs"].concat(__slice.call(params), [function(err, s, b, h) { | ||
var cb, i, params, ref; | ||
params = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), cb = arguments[i++]; | ||
return (ref = this.client).get.apply(ref, ["/users/" + this.login + "/orgs"].concat(slice.call(params), [function(err, s, b, h) { | ||
if (err) { | ||
@@ -119,0 +119,0 @@ return cb(err); |
{ | ||
"name": "octonode", | ||
"version": "0.6.16", | ||
"version": "0.6.17", | ||
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (http://pksunkara.github.com)", | ||
@@ -43,3 +43,3 @@ "description": "nodejs wrapper for github v3 api", | ||
"vows": "0.8.x", | ||
"coffee-script": "1.8.0" | ||
"coffee-script": "1.9.x" | ||
}, | ||
@@ -46,0 +46,0 @@ "engines": { |
@@ -379,2 +379,16 @@ # octonode [![Gitter chat](https://badges.gitter.im/pksunkara/octonode.svg)](https://gitter.im/pksunkara/octonode) | ||
#### List all issues across owned and member repositories (GET /user/issues) | ||
This query supports [pagination](#pagination). | ||
```js | ||
ghme.issues({ | ||
page: 2, | ||
per_page: 100, | ||
filter: 'assigned', | ||
state: 'open', | ||
sort: 'created' | ||
}, callback); //array of issues | ||
``` | ||
## Github users api | ||
@@ -1106,3 +1120,2 @@ | ||
me.stop_watching('repo', callback); | ||
me.get_issues(params, callback); | ||
@@ -1109,0 +1122,0 @@ // organization data |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
106581
2375
1234
1