From 178f3070bc5684bef05f27d4e5db3d815c0e53a7 Mon Sep 17 00:00:00 2001 From: Jerry Sievert Date: Mon, 7 Oct 2013 10:29:29 -0700 Subject: [PATCH 1/3] add the ability to override github API url --- github.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/github.js b/github.js index 2cdefc37..3629c52d 100644 --- a/github.js +++ b/github.js @@ -24,9 +24,8 @@ } - var API_URL = 'https://api.github.com'; - var Github = function(options) { + options.api_url = options.api_url || 'https://api.github.com'; // HTTP Request Abstraction // ======= @@ -35,7 +34,7 @@ function _request(method, path, data, cb, raw) { function getURL() { - var url = API_URL + path; + var url = options.api_url + path; return url + ((/\?/).test(url) ? "&" : "?") + (new Date()).getTime(); } From 99acc5cccc0ea8d5465753d2d3d2ebf5eefdfa08 Mon Sep 17 00:00:00 2001 From: Jerry Sievert Date: Fri, 11 Oct 2013 10:24:01 -0700 Subject: [PATCH 2/3] add issues --- github.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/github.js b/github.js index 3629c52d..7749aca9 100644 --- a/github.js +++ b/github.js @@ -179,6 +179,12 @@ "sha": null }; + // Get issues + // -------- + + this.getIssues = function(cb) { + _request("GET", repoPath + "/issues?type=all&per_page=1000", options, cb); + }; // Delete a repo // -------- From bc891c02c67d3e290fa6d476550ac82e44745b0a Mon Sep 17 00:00:00 2001 From: Jerry Sievert Date: Fri, 11 Oct 2013 10:26:23 -0700 Subject: [PATCH 3/3] change package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 213adb87..1ae32b47 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "github", + "name": "github-api", "version": "0.7.0", "description": "A higher-level wrapper around the Github API.", "main": "github.js",