diff --git a/github.js b/github.js index 2509ec0..fe5a0fa 100644 --- a/github.js +++ b/github.js @@ -254,10 +254,17 @@ // 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; }; + // 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 @@ -322,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; @@ -664,4 +671,4 @@ } ); -}(window)); \ No newline at end of file +}(window));