Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

95

api/v3.0.0/authorization.js

@@ -41,3 +41,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -52,8 +55,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -83,3 +88,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -94,8 +102,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -127,3 +137,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -138,8 +151,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -174,3 +189,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -185,8 +203,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -216,3 +236,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -227,8 +250,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -235,0 +260,0 @@ if (callback)

@@ -41,3 +41,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -52,8 +55,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -86,3 +91,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -97,8 +105,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -131,3 +141,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -142,8 +155,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -176,3 +191,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -187,8 +205,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -220,3 +240,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -231,8 +254,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -264,3 +289,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -275,8 +303,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -308,3 +338,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -319,8 +352,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -352,3 +387,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -363,8 +401,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -396,3 +436,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -407,8 +450,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -441,3 +486,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -452,8 +500,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -460,0 +510,0 @@ if (callback)

@@ -42,3 +42,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -53,8 +56,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -87,3 +92,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -98,8 +106,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -131,3 +141,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -142,8 +155,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -175,3 +190,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -186,8 +204,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -217,3 +237,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -228,8 +251,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -259,3 +284,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -270,8 +298,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -301,3 +331,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -312,8 +345,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -343,3 +378,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -354,8 +392,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -385,3 +425,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -396,8 +439,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -427,3 +472,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -438,8 +486,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -469,3 +519,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -480,8 +533,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -511,3 +566,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -522,8 +580,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -553,3 +613,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -564,8 +627,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -596,3 +661,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -607,8 +675,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -639,3 +709,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -650,8 +723,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -683,3 +758,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -694,8 +772,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -726,3 +806,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -737,8 +820,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -745,0 +830,0 @@ if (callback)

@@ -44,3 +44,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -55,8 +58,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -89,3 +94,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -100,8 +108,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -133,3 +143,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -144,8 +157,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -181,3 +196,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -192,8 +210,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -225,3 +245,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -236,8 +259,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -270,3 +295,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -281,8 +309,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -315,3 +345,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -326,8 +359,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -361,3 +396,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -372,8 +410,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -405,3 +445,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -416,8 +459,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -449,3 +494,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -460,8 +508,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -497,3 +547,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -508,8 +561,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -542,3 +597,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -553,8 +611,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -587,3 +647,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -598,8 +661,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -606,0 +671,0 @@ if (callback)

@@ -40,3 +40,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -51,8 +54,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -82,3 +87,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -93,8 +101,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -101,0 +111,0 @@ if (callback)

@@ -47,3 +47,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -58,8 +61,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -84,2 +89,3 @@ if (callback)

* - assignee (String): Optional. String User login, `none` for Issues with no assigned User. `*` for Issues with any assigned User.
* - creator (String): Optional. The user that created the issue.
* - mentioned (String): Optional. String User login.

@@ -101,3 +107,6 @@ * - labels (String): Optional. String list of comma separated Label names. Example: bug,ui,@high

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -112,8 +121,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -145,3 +156,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -156,8 +170,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -183,3 +199,3 @@ if (callback)

* - milestone (Number): Optional. Milestone to associate this issue with. Validation rule: ` ^[0-9]+$ `.
* - labels (Json): Required. Array of strings - Labels to associate with this issue.
* - labels (Json): Optional. Array of strings - Labels to associate with this issue.
**/

@@ -194,3 +210,6 @@ this.create = function(msg, block, callback) {

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -205,8 +224,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -244,3 +265,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -255,8 +279,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -292,3 +318,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -303,8 +332,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -338,3 +369,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -349,8 +383,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -382,3 +418,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -393,8 +432,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -427,3 +468,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -438,8 +482,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -472,3 +518,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -483,8 +532,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -516,3 +567,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -527,8 +581,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -562,3 +618,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -573,8 +632,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -607,3 +668,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -618,8 +682,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -651,3 +717,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -662,8 +731,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -696,3 +767,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -707,8 +781,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -740,3 +816,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -751,8 +830,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -785,3 +866,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -796,8 +880,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -830,3 +916,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -841,8 +930,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -874,3 +965,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -885,8 +979,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -918,3 +1014,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -929,8 +1028,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -965,3 +1066,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -976,8 +1080,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1009,3 +1115,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -1020,8 +1129,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1056,3 +1167,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -1067,8 +1181,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1104,3 +1220,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -1115,8 +1234,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1148,3 +1269,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -1159,8 +1283,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1167,0 +1293,0 @@ if (callback)

@@ -42,3 +42,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -53,8 +56,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -66,2 +71,47 @@ if (callback)

/** section: github
* markdown#renderRaw(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
* - data (String): Required. Raw data to send as the body of the request
**/
this.renderRaw = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}
if (callback)
callback(null, ret);
});
};
}).call(markdown.markdown);

@@ -43,2 +43,15 @@ /*

});
it("should successfully execute POST /markdown/raw (render)", function(next) {
client.markdown.renderRaw(
{
data: "Hello world github/linguist#1 **cool**, and #1!"
},
function(err, res) {
Assert.equal(err, null);
console.log(res);
next();
}
);
});
});

@@ -40,3 +40,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -51,8 +54,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -82,3 +87,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -93,8 +101,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -124,3 +134,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -135,8 +148,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -143,0 +158,0 @@ if (callback)

@@ -42,3 +42,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -53,8 +56,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -86,3 +91,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -97,8 +105,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -133,3 +143,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -144,8 +157,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -168,2 +183,3 @@ if (callback)

* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
* - filter (String): Optional. Validation rule: ` ^(all|2fa_disabled)$ `.
**/

@@ -178,3 +194,6 @@ this.getMembers = function(msg, block, callback) {

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -189,8 +208,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -221,3 +242,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -232,8 +256,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -264,3 +290,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -275,8 +304,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -306,3 +337,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -317,8 +351,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -349,3 +385,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -360,8 +399,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -392,3 +433,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -403,8 +447,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -435,3 +481,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -446,8 +495,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -479,3 +530,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -490,8 +544,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -521,3 +577,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -532,8 +591,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -566,3 +627,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -577,8 +641,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -610,3 +676,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -621,8 +690,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -652,3 +723,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -663,8 +737,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -696,3 +772,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -707,8 +786,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -739,3 +820,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -750,8 +834,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -782,3 +868,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -793,8 +882,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -825,3 +916,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -836,8 +930,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -850,2 +946,48 @@ if (callback)

/** section: github
* orgs#addTeamMembership(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
* - id (String): Required.
* - user (String): Required.
**/
this.addTeamMembership = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}
if (callback)
callback(null, ret);
});
};
/** section: github
* orgs#getTeamRepos(msg, callback) -> null

@@ -870,3 +1012,6 @@ * - msg (Object): Object that contains the parameters and their values to be sent to the server.

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -881,8 +1026,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -914,3 +1061,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -925,8 +1075,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -958,3 +1110,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -969,8 +1124,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1002,3 +1159,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -1013,8 +1173,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -1021,0 +1183,0 @@ if (callback)

@@ -33,2 +33,4 @@ /**

* - state (String): Optional. open, closed, or all Validation rule: ` ^(open|closed|all)$ `.
* - head (String): Optional.
* - base (String): Optional.
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.

@@ -47,3 +49,6 @@ * - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -58,8 +63,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -91,3 +98,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -102,8 +112,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -138,3 +150,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -149,8 +164,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -184,3 +201,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -195,8 +215,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -231,3 +253,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -242,8 +267,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -277,3 +304,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -288,8 +318,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -323,3 +355,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -334,8 +369,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -369,3 +406,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -380,8 +420,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -414,3 +456,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -425,8 +470,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -460,3 +507,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -471,8 +521,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -504,3 +556,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -515,8 +570,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -552,3 +609,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -563,8 +623,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -598,3 +660,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -609,8 +674,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -643,3 +710,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -654,8 +724,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -687,3 +759,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -698,8 +773,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -706,0 +783,0 @@ if (callback)

@@ -34,2 +34,4 @@ /*

repo: "String",
base: "String",
head: "String",
state: "String",

@@ -36,0 +38,0 @@ page: "Number",

@@ -43,3 +43,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -54,8 +57,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -87,3 +92,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -98,8 +106,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -136,3 +146,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -147,8 +160,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -186,3 +201,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -197,8 +215,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -230,3 +250,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -241,8 +264,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -274,3 +299,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -285,8 +313,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -318,3 +348,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -329,8 +362,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -343,2 +378,50 @@ if (callback)

/** section: github
* releases#uploadAsset(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
* - owner (String): Required.
* - id (Number): Required.
* - repo (String): Required.
* - name (String): Required. the file name of the asset
**/
this.uploadAsset = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}
if (callback)
callback(null, ret);
});
};
/** section: github
* releases#editAsset(msg, callback) -> null

@@ -365,3 +448,6 @@ * - msg (Object): Object that contains the parameters and their values to be sent to the server.

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -376,8 +462,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -409,3 +497,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -420,8 +511,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -428,0 +521,0 @@ if (callback)

@@ -14,2 +14,4 @@ /*

var Client = require("./../../index");
var fs = require("fs");
var mime = require("mime");

@@ -24,2 +26,4 @@ describe("[releases]", function() {

var releaseIdWithAsset = 393621; // Some release id from the repo above that has at least 1 asset.
var filePathToUpload = __filename;
var fileSizeToUpload = fs.statSync(filePathToUpload).size;

@@ -195,2 +199,24 @@ var releaseId; // release id found when listing releases. Used for get release

it("should successfully execute POST /repos/:owner/:repo/releases/:id/assets (uploadAsset)", function(next) {
var name = "somenameornot.zip";
client.releases.uploadAsset(
{
owner: owner,
id: releaseIdWithAsset,
repo: repo,
name: name,
filePath: filePathToUpload
},
function(err, res) {
Assert.equal(err, null);
Assert.equal(res.content_type, mime.lookup(name)); // matches extension of name, not filePath
Assert.equal(res.state, "uploaded");
Assert.equal(res.size, fileSizeToUpload);
Assert.equal(res.name, name);
newAssetId = res.id;
next();
}
);
});
it("should successfully execute PATCH /repos/:owner/:repo/releases/assets/:id (editAsset)", function(next) {

@@ -201,13 +227,17 @@ if (!newAssetId) {

}
var newName = "somenewname.zip";
client.releases.editAsset(
{
owner: owner,
id: "Number",
id: newAssetId,
repo: repo,
name: "String",
label: "String"
name: newName,
label: "foo"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
Assert.equal(res.state, "uploaded");
Assert.equal(res.size, fileSizeToUpload);
Assert.equal(res.name, newName);
Assert.equal(res.label, "foo");
next();

@@ -226,3 +256,3 @@ }

owner: owner,
id: "Number",
id: newAssetId,
repo: repo

@@ -229,0 +259,0 @@ },

@@ -23,2 +23,51 @@ /**

/** section: github
* search#code(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
* - q (String): Required. Search Term
* - sort (String): Optional. indexed only Validation rule: ` ^indexed$ `.
* - order (String): Optional. asc or desc Validation rule: ` ^(asc|desc)$ `.
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
**/
this.code = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}
if (callback)
callback(null, ret);
});
};
/** section: github
* search#issues(msg, callback) -> null

@@ -45,3 +94,6 @@ * - msg (Object): Object that contains the parameters and their values to be sent to the server.

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -56,8 +108,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -91,3 +145,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -102,8 +159,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -137,3 +196,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -148,8 +210,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -179,3 +243,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -190,8 +257,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -198,0 +267,0 @@ if (callback)

@@ -29,6 +29,22 @@ /*

it("should successfully execute GET /search/code/:q (code)", function(next) {
client.search.code(
{
q: ['test', 'repo:mikedeboertest/1423836276146'].join('+')
},
function(err, res) {
Assert.equal(err, null);
Assert.equal(res.items.length, 1);
var file = res.items[0];
Assert.equal(file.name, "TEST.md");
next();
}
);
});
it("should successfully execute GET /search/issues/:q (issues)", function(next) {
client.search.issues(
{
q: ['macaroni', 'repo:mikedeboertest/node_chat', 'state:open'].join('+')
q: ['debate', 'repo:mikedeboertest/node_chat', 'state:open'].join('+')
},

@@ -35,0 +51,0 @@ function(err, res) {

@@ -42,3 +42,6 @@ /**

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -53,8 +56,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -86,3 +91,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -97,8 +105,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -134,3 +144,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -145,8 +158,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -153,0 +168,0 @@ if (callback)

@@ -23,2 +23,47 @@ /**

/** section: github
* user#getAll(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
* - since (Number): Optional. The integer ID of the last User that you’ve seen.
**/
this.getAll = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}
if (callback)
callback(null, ret);
});
};
/** section: github
* user#getFrom(msg, callback) -> null

@@ -41,3 +86,6 @@ * - msg (Object): Object that contains the parameters and their values to be sent to the server.

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -52,8 +100,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -83,3 +133,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -94,8 +147,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -131,3 +186,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -142,8 +200,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -174,3 +234,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -185,8 +248,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -199,2 +264,48 @@ if (callback)

/** section: github
* user#editOrganizationMembership(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - headers (Object): Optional. Key/ value pair of request headers to pass along with the HTTP request. Valid headers are: 'If-Modified-Since', 'If-None-Match', 'Cookie', 'User-Agent', 'Accept', 'X-GitHub-OTP'.
* - org (String): Required.
* - state (String): Required. Validation rule: ` ^(open|closed|active)$ `.
**/
this.editOrganizationMembership = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}
if (callback)
callback(null, ret);
});
};
/** section: github
* user#getTeams(msg, callback) -> null

@@ -218,3 +329,6 @@ * - msg (Object): Object that contains the parameters and their values to be sent to the server.

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -229,8 +343,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -261,3 +377,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -272,8 +391,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -303,3 +424,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -314,8 +438,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -345,3 +471,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -356,8 +485,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -389,3 +520,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -400,8 +534,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -433,3 +569,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -444,8 +583,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -476,3 +617,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -487,8 +631,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -520,3 +666,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -531,8 +680,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -562,3 +713,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -573,8 +727,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -604,3 +760,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -615,8 +774,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -647,3 +808,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -658,8 +822,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -691,3 +857,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -702,8 +871,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -733,3 +904,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -744,8 +918,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -776,3 +952,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -787,8 +966,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -820,3 +1001,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -831,8 +1015,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -862,3 +1048,6 @@ if (callback)

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -873,8 +1062,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "x-ratelimit-reset", "x-oauth-scopes", "link", "location", "last-modified", "etag", "status"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -881,0 +1072,0 @@ if (callback)

"use strict";
var error = require("./error");
var fs = require("fs");
var mime = require("mime");
var Util = require("./util");

@@ -508,3 +510,6 @@ var Url = require("url");

try {
ret = res.data && JSON.parse(res.data);
ret = res.data;
var contentType = res.headers["content-type"];
if (contentType && contentType.indexOf("application/json") !== -1)
ret = JSON.parse(ret);
}

@@ -519,8 +524,10 @@ catch (ex) {

ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "link"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (typeof ret == "object") {
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "link"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
}

@@ -576,9 +583,16 @@ if (callback)

function getRequestFormat(hasBody, block) {
if (hasBody)
return block.requestFormat || this.constants.requestFormat;
return "query";
}
function getQueryAndUrl(msg, def, format, config) {
var url = def.url;
if (config.pathPrefix) {
if (config.pathPrefix && url.indexOf(config.pathPrefix) !== 0) {
url = config.pathPrefix + def.url;
}
var ret = {
query: format == "json" ? {} : []
query: format == "json" ? {} : format == "raw" ? msg.data : []
};

@@ -629,3 +643,3 @@ if (!def || !def.params) {

ret.query[paramName] = val;
else
else if (format != "raw")
ret.query.push(paramName + "=" + val);

@@ -652,6 +666,5 @@ }

var method = block.method.toLowerCase();
var hasBody = ("head|get|delete".indexOf(method) === -1);
var format = hasBody && this.constants.requestFormat
? this.constants.requestFormat
: "query";
var hasFileBody = block.hasFileBody;
var hasBody = !hasFileBody && ("head|get|delete".indexOf(method) === -1);
var format = getRequestFormat.call(this, hasBody, block);
var obj = getQueryAndUrl(msg, block, format, self.config);

@@ -663,5 +676,4 @@ var query = obj.query;

var protocol = this.config.protocol || this.constants.protocol || "http";
var host = this.config.host || this.constants.host;
var host = block.host || this.config.host || this.constants.host;
var port = this.config.port || this.constants.port || (protocol == "https" ? 443 : 80);
var proxyUrl;

@@ -699,3 +711,3 @@ if (this.config.proxy !== undefined) {

query = JSON.stringify(query);
else
else if (format != "raw")
query = query.join("&");

@@ -705,3 +717,5 @@ headers["content-length"] = Buffer.byteLength(query, "utf8");

? "application/json; charset=utf-8"
: "application/x-www-form-urlencoded; charset=utf-8";
: format == "raw"
? "text/plain; charset=utf-8"
: "application/x-www-form-urlencoded; charset=utf-8";
}

@@ -733,2 +747,10 @@ if (this.auth) {

function callCallback(err, result) {
if (callback) {
var cb = callback;
callback = undefined;
cb(err, result);
}
}
function addCustomHeaders(customHeaders) {

@@ -764,64 +786,72 @@ Object.keys(customHeaders).forEach(function(header) {

var callbackCalled = false
function httpSendRequest() {
var req = require(protocol).request(options, function(res) {
if (self.debug) {
console.log("STATUS: " + res.statusCode);
console.log("HEADERS: " + JSON.stringify(res.headers));
}
res.setEncoding("utf8");
var data = "";
res.on("data", function(chunk) {
data += chunk;
});
res.on("error", function(err) {
callCallback(err);
});
res.on("end", function() {
if (res.statusCode >= 400 && res.statusCode < 600 || res.statusCode < 10) {
callCallback(new error.HttpError(data, res.statusCode));
} else {
res.data = data;
callCallback(null, res);
}
});
});
var req = require(protocol).request(options, function(res) {
if (self.debug) {
console.log("STATUS: " + res.statusCode);
console.log("HEADERS: " + JSON.stringify(res.headers));
var timeout = (block.timeout !== undefined) ? block.timeout : self.config.timeout;
if (timeout) {
req.setTimeout(timeout);
}
res.setEncoding("utf8");
var data = "";
res.on("data", function(chunk) {
data += chunk;
req.on("error", function(e) {
if (self.debug)
console.log("problem with request: " + e.message);
callCallback(e.message);
});
res.on("error", function(err) {
if (!callbackCalled) {
callbackCalled = true;
callback(err);
}
});
res.on("end", function() {
if (callbackCalled)
return;
callbackCalled = true;
if (res.statusCode >= 400 && res.statusCode < 600 || res.statusCode < 10) {
callback(new error.HttpError(data, res.statusCode));
} else {
res.data = data;
callback(null, res);
}
req.on("timeout", function() {
if (self.debug)
console.log("problem with request: timed out");
callCallback(new error.GatewayTimeout());
});
});
if (this.config.timeout) {
req.setTimeout(this.config.timeout);
}
req.on("error", function(e) {
if (self.debug)
console.log("problem with request: " + e.message);
if (!callbackCalled) {
callbackCalled = true;
callback(e.message);
// write data to request body
if (hasBody && query.length) {
if (self.debug)
console.log("REQUEST BODY: " + query + "\n");
req.write(query + "\n");
}
});
req.on("timeout", function() {
if (self.debug)
console.log("problem with request: timed out");
if (!callbackCalled) {
callbackCalled = true;
callback(new error.GatewayTimeout());
if (block.hasFileBody) {
var stream = fs.createReadStream(msg.filePath);
stream.pipe(req);
} else {
req.end();
}
});
};
// write data to request body
if (hasBody && query.length) {
if (self.debug)
console.log("REQUEST BODY: " + query + "\n");
req.write(query + "\n");
if (hasFileBody) {
fs.stat(msg.filePath, function(err, stat) {
if (err) {
callCallback(err);
} else {
headers["content-length"] = stat.size;
headers["content-type"] = mime.lookup(msg.name);
httpSendRequest();
}
});
} else {
httpSendRequest();
}
req.end();
};
}).call(Client.prototype);
{
"name" : "github",
"version" : "0.2.3",
"version" : "0.2.4",
"description" : "NodeJS wrapper for the GitHub API",

@@ -18,2 +18,5 @@ "author": "Mike de Boer <info@mikedeboer.nl>",

},
"dependencies": {
"mime": "^1.2.11"
},
"devDependencies": {

@@ -20,0 +23,0 @@ "oauth": "~0.9.7",

@@ -7,3 +7,3 @@ # JavaScript GitHub API for Node.JS

Install with the Node.JS package manager [npm](http://npmjs.org/) ![NPM version](https://badge.fury.io/js/github.png):
Install with the Node.JS package manager [npm](http://npmjs.org/) ![NPM version](https://badge.fury.io/js/github.svg):

@@ -24,3 +24,3 @@ $ npm install github

Additionally, the [official Github documentation](http://developer.github.com/)
Additionally, the [official Github documentation](https://developer.github.com/v3/)
is a very useful resource.

@@ -40,7 +40,7 @@

protocol: "https",
host: "github.my-GHE-enabled-company.com",
pathPrefix: "/api/v3", // for some GHEs
host: "github.my-GHE-enabled-company.com", // should be api.github.com for GitHub
pathPrefix: "/api/v3", // for some GHEs; none for GitHub
timeout: 5000,
headers: {
"user-agent": "My-Cool-GitHub-App", // GitHub is happy with a unique user agent
"user-agent": "My-Cool-GitHub-App" // GitHub is happy with a unique user agent
}

@@ -153,3 +153,3 @@ });

* Rate Limit: 100%
* Releases: 90%
* Releases: 100%
* Gitignore: 100%

@@ -156,0 +156,0 @@ * Meta: 100%

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc