Created
May 9, 2012 16:33
-
-
Save mattroyer/2646327 to your computer and use it in GitHub Desktop.
Return all GitHub Gists from a user through jQuery
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
// In this example, I'll use my own username to get all of my gists | |
// into a Div element with an ID of "gists". | |
$(document).ready(function() { | |
$.getJSON("https://api.github.com/users/mattroyer/gists?callback=?", function(json) { | |
$.each(json.data, function(index, value) { | |
$('#gists').append('<li><a href="' + value.html_url + '">' + value.description + '</a></li>'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment