Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f83c5de

Browse files
adjohnson916AurelioDeRosa
authored andcommitted
Expose request methods.
Closes github-toolsgh-221
1 parent c5ffb38 commit f83c5de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

github.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//
4949
// I'm not proud of this and neither should you be if you were responsible for the XMLHttpRequest spec.
5050

51-
function _request(method, path, data, cb, raw, sync) {
51+
var _request = Github._request = function _request(method, path, data, cb, raw, sync) {
5252
function getURL() {
5353
var url = path.indexOf('//') >= 0 ? path : API_URL + path;
5454
url += ((/\?/).test(url) ? '&' : '?');
@@ -97,9 +97,9 @@
9797
if (sync) {
9898
return xhr.response;
9999
}
100-
}
100+
};
101101

102-
function _requestAllPages(path, cb) {
102+
var _requestAllPages = Github._requestAllPages = function _requestAllPages(path, cb) {
103103
var results = [];
104104
(function iterate() {
105105
_request('GET', path, null, function(err, res, xhr) {
@@ -127,7 +127,7 @@
127127
}
128128
});
129129
})();
130-
}
130+
};
131131

132132

133133
// User API

0 commit comments

Comments
 (0)