var GitHubApi = require("github");
var github = new GitHubApi({
// required
version: "3.0.0",
// optional
debug: true,
protocol: "https",
host: "github.com",
//pathPrefix: "/joyent/node", // for some GHEs
timeout: 5000
});
github.gitdata.getCommit({
user: "bnoordhuis",
repo: "/joyent/node",
sha: "c30cc4e3a5ead3ca5b48e8eec445740775888ed8"
}, function(err, res) {
console.log(JSON.stringify(res));
});
I posted the code above. I found a random branch in github for testing. I also found a random user as well as that user's commit randomly. I read information about the API here: http://mikedeboer.github.io/node-github/#gitdata.prototype.getCommit
When I run the code above, I get error code 404, null bnoordhuis undefined
Any help would be awesome! I am a noob to using github api.
Here is the repo I am trying to use: https://github.com/joyent/node/