Socket
Socket
Sign inDemoInstall

octonode

Package Overview
Dependencies
41
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.18 to 0.7.0

76

lib/octonode/gist.js

@@ -110,10 +110,13 @@ // Generated by CoffeeScript 1.9.3

Gist.prototype["delete"] = function(id) {
return this.client.del("/gists/" + id, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this["delete"](id);
}
};
})(this));
Gist.prototype["delete"] = function(id, cb) {
return this.client.del("/gists/" + id, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("Gist delete error"));
} else {
return cb(null);
}
});
};

@@ -134,23 +137,29 @@

Gist.prototype.star = function(id) {
return this.client.put("/gists/" + id + "/star", {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.star(id);
}
};
})(this));
Gist.prototype.star = function(id, cb) {
return this.client.put("/gists/" + id + "/star", {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("Gist star error"));
} else {
return cb(null);
}
});
};
Gist.prototype.unstar = function(id) {
return this.client.del("/gists/" + id + "/unstar", {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.unstar(id);
}
};
})(this));
Gist.prototype.unstar = function(id, cb) {
return this.client.del("/gists/" + id + "/unstar", {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("Gist unstar error"));
} else {
return cb(null);
}
});
};
Gist.prototype.check = function(id) {
Gist.prototype.check = function(id, cb) {
return this.client.get("/gists/" + id + "/star", function(err, s, b, h) {

@@ -217,9 +226,12 @@ if (err) {

Gist.prototype.deleteComment = function(id) {
return this.client.del("/gists/comments/" + id, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.deleteComment(id);
}
};
})(this));
return this.client.del("/gists/comments/" + id, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("Gist deleteComment error"));
} else {
return cb(null);
}
});
};

@@ -226,0 +238,0 @@

@@ -95,10 +95,13 @@ // Generated by CoffeeScript 1.9.3

Me.prototype.deleteEmails = function(emails) {
return this.client.del('/user/emails', emails, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.deleteEmails(emails);
}
};
})(this));
Me.prototype.deleteEmails = function(emails, cb) {
return this.client.del('/user/emails', emails, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("User deleteEmails error"));
} else {
return cb(null);
}
});
};

@@ -148,20 +151,26 @@

Me.prototype.follow = function(user) {
return this.client.put("/user/following/" + user, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.follow(user);
}
};
})(this));
Me.prototype.follow = function(user, cb) {
return this.client.put("/user/following/" + user, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("User follow error"));
} else {
return cb(null);
}
});
};
Me.prototype.unfollow = function(user) {
return this.client.del("/user/following/" + user, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.unfollow(user);
}
};
})(this));
Me.prototype.unfollow = function(user, cb) {
return this.client.del("/user/following/" + user, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("User unfollow error"));
} else {
return cb(null);
}
});
};

@@ -193,20 +202,26 @@

Me.prototype.star = function(repo) {
return this.client.put("/user/starred/" + repo, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.star(repo);
}
};
})(this));
Me.prototype.star = function(repo, cb) {
return this.client.put("/user/starred/" + repo, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("User star error"));
} else {
return cb(null);
}
});
};
Me.prototype.unstar = function(repo) {
return this.client.del("/user/starred/" + repo, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.unstar(repo);
}
};
})(this));
Me.prototype.unstar = function(repo, cb) {
return this.client.del("/user/starred/" + repo, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("User unstar error"));
} else {
return cb(null);
}
});
};

@@ -292,10 +307,13 @@

Me.prototype.deleteKey = function(id) {
return this.client.del("/user/keys/" + id, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.deleteKey(id);
}
};
})(this));
Me.prototype.deleteKey = function(id, cb) {
return this.client.del("/user/keys/" + id, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("User deleteKey error"));
} else {
return cb(null);
}
});
};

@@ -302,0 +320,0 @@

@@ -593,10 +593,13 @@ // Generated by CoffeeScript 1.9.3

Repo.prototype.destroy = function() {
return this.client.del("/repos/" + this.name, {}, (function(_this) {
return function(err, s, b, h) {
if ((err != null) || s !== 204) {
return _this.destroy();
}
};
})(this));
Repo.prototype.destroy = function(cb) {
return this.client.del("/repos/" + this.name, {}, function(err, s, b, h) {
if (err) {
return cb(err);
}
if (s !== 204) {
return cb(new Error("Repo destroy error"));
} else {
return cb(null);
}
});
};

@@ -603,0 +606,0 @@

{
"name": "octonode",
"version": "0.6.18",
"version": "0.7.0",
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (http://pksunkara.github.com)",

@@ -17,20 +17,2 @@ "description": "nodejs wrapper for github v3 api",

},
"contributors": [
{
"name": "Pavan Kumar Sunkara",
"email": "pavan.sss1991@gmail.com"
},
{
"name": "Martin Wawrusch",
"email": "martin@wawrusch.com"
},
{
"name": "Joe Frambach",
"email": "joe.frambach@showclix.com"
},
{
"name": "Matthew Taylor",
"email": "rhyolight@gmail.com"
}
],
"dependencies": {

@@ -37,0 +19,0 @@ "request": "2.51.x",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc