Permalink
Browse files

Merge pull request #282 from hostalerye/master

Changed github apiHost url and fetchOAuthUser to work with github api v3
  • Loading branch information...
2 parents 784547f + be7c423 commit 9f2c438025d6635d051a23a706176f18c0f26956 @bnoguchi committed Jun 13, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/modules/github.js
View
@@ -7,7 +7,7 @@ oauthModule.submodule('github')
})
.oauthHost('https://github.com')
- .apiHost('https://github.com/api/v2/json')
+ .apiHost('https://api.github.com')
.authPath('/login/oauth/authorize')
.accessTokenPath('/login/oauth/access_token')
@@ -21,9 +21,9 @@ oauthModule.submodule('github')
.fetchOAuthUser( function (accessToken) {
var p = this.Promise();
- this.oauth.get(this.apiHost() + '/user/show', accessToken, function (err, data) {
+ this.oauth.get(this.apiHost() + '/user', accessToken, function (err, data) {
if (err) return p.fail(err);
- var oauthUser = JSON.parse(data).user;
+ var oauthUser = JSON.parse(data);
p.fulfill(oauthUser);
})
return p;

0 comments on commit 9f2c438

Please sign in to comment.