From ec7c126aa3c823094a733ca72c658b052854d82c Mon Sep 17 00:00:00 2001 From: Sameer on mactop Date: Mon, 7 Feb 2011 18:22:17 -0800 Subject: [PATCH 1/3] search by email --- github.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/github.js b/github.js index 2509ec0..5611de9 100644 --- a/github.js +++ b/github.js @@ -258,6 +258,13 @@ return this; }; + // Search users by email for `query`. + gh.user.search_email = function (query, callback, context) { + jsonp("user/email/" + query, callback, context); + return this; + }; + + // ### Repositories // This is the base constructor for creating repo objects. Note that this From e12f8d196125e299f73a9dc198a327885c0089be Mon Sep 17 00:00:00 2001 From: Sameer on mactop Date: Tue, 8 Feb 2011 13:06:55 -0800 Subject: [PATCH 2/3] allow multiword user name queries --- github.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github.js b/github.js index 5611de9..3a163ba 100644 --- a/github.js +++ b/github.js @@ -254,7 +254,7 @@ // Search users for `query`. gh.user.search = function (query, callback, context) { - jsonp("user/search/" + query, callback, context); + jsonp("user/search/" + query.replace(" ", "+"), callback, context); return this; }; @@ -671,4 +671,4 @@ } ); -}(window)); \ No newline at end of file +}(window)); From 42218130aba036e9c44ce1d465423a33b1598d6a Mon Sep 17 00:00:00 2001 From: Sameer on mactop Date: Tue, 8 Feb 2011 18:53:58 -0800 Subject: [PATCH 3/3] extraneous / --- github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github.js b/github.js index 3a163ba..fe5a0fa 100644 --- a/github.js +++ b/github.js @@ -329,7 +329,7 @@ // Gather line count information on the language(s) used in this repo. gh.repo.prototype.languages = function (callback, context) { - jsonp("/repos/show/" + this.user + "/" + this.repo + "/languages", + jsonp("repos/show/" + this.user + "/" + this.repo + "/languages", callback, context); return this;