Created
December 27, 2014 22:02
-
-
Save mcai4gl2/d32a985b695ef58cd31b to your computer and use it in GitHub Desktop.
Example to access Github API using github.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUnit.test('Read user details', function() { | |
var github = ghClient.Github; | |
var user = github.getUser(); | |
console.log(user); | |
QUnit.ok(user, "User shall not be undefined"); | |
QUnit.stop(); | |
user.show("mcai4gl2", function(err, user) { | |
if (err) { | |
console.log(err); | |
} else { | |
console.log(user); | |
var login = user.login; | |
QUnit.equal("mcai4gl2", login, "Username shall be mcai4gl2"); | |
} | |
}); | |
setTimeout(function() { | |
start(); | |
}, 1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment