Created
November 1, 2011 18:17
-
-
Save benhodgson/1331418 to your computer and use it in GitHub Desktop.
Fetch the Watchers and Forks counts for a GitHub repo
This file contains hidden or 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
// What up, @mdo. You'll need a recent version of jQuery. | |
// You can try this out by pasting it into the console on http://api.jquery.com/jQuery.ajax/ | |
window.repoCallback = function (obj) { | |
console.log("Watchers:" + obj['repository']['watchers']); | |
console.log("Forks:" + obj['repository']['forks']); | |
} | |
$.ajax("http://github.com/api/v2/json/repos/show/twitter/bootstrap?callback=repoCallback", {dataType: "jsonp"}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment