Created
February 9, 2015 16:34
-
-
Save al-the-x/06f329b12e32557eaa31 to your computer and use it in GitHub Desktop.
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
$(document).ready(function() { | |
var userData = $.getJSON("https://api.github.com/users/adamkarb"); | |
userData.done(function(user) { | |
$("#myname").html(user.name); | |
$("#myusername").html(user.login); | |
$("#created").html(user.created_at); | |
$("#email").html(user.email); | |
$("#location").html(user.location); | |
}); | |
$('.main-tabs a[href="#repositories"]').on('click', function(){ | |
// populate the repositories JUST IN TIME... | |
userData.done(function(user){ | |
$.getJSON(user.repos_url).done(function(repos){ | |
// do stuff with repos... | |
}); | |
}); | |
}); // on(click, .main-tabs a[href="#repositories"] | |
$("#submission").click(function() { | |
var comment = $("#comments").val(); | |
$("#comments").val("") | |
$.post("https://api.github.com/repos/TheIronYard--Orlando/FEE--2015--SPRING/issues/252/comments?access_token=8acb8c2be6e24b7a0bda74f57f1225c76bed52e8", | |
JSON.stringify({"body": comment}) | |
); | |
$("#commentform").submit(); | |
}) | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment