Skip to content

Instantly share code, notes, and snippets.

@mattroyer
Created May 9, 2012 16:33
Show Gist options
  • Save mattroyer/2646327 to your computer and use it in GitHub Desktop.
Save mattroyer/2646327 to your computer and use it in GitHub Desktop.
Return all GitHub Gists from a user through jQuery
// 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