aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/source/javascripts
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2012-09-09 12:51:48 -0700
committerBrandon Mathis <brandon@imathis.com>2012-09-09 12:51:48 -0700
commite63a0f1c3bb6e3f339d37af934c60400aa3059d3 (patch)
treeb4c038bc3e7766c8d067b66fe4813b0135c52589 /.themes/classic/source/javascripts
parent17c1c915095e6579b8c21fd568f725ae3dc4edc5 (diff)
parent9d7240e47f8edd732b5f7912d13b95266a3f4098 (diff)
downloadmy_new_personal_website-e63a0f1c3bb6e3f339d37af934c60400aa3059d3.tar.xz
my_new_personal_website-e63a0f1c3bb6e3f339d37af934c60400aa3059d3.zip
Merge pull request #675 from zlu/master
Update Github API to V3
Diffstat (limited to '.themes/classic/source/javascripts')
-rw-r--r--.themes/classic/source/javascripts/github.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js
index 678775a9..9e98b8c2 100644
--- a/.themes/classic/source/javascripts/github.js
+++ b/.themes/classic/source/javascripts/github.js
@@ -3,22 +3,22 @@ var github = (function(){
var i = 0, fragment = '', t = $(target)[0];
for(i = 0; i < repos.length; i++) {
- fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>';
+ fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+(repos[i].description||'')+'</p></li>';
}
t.innerHTML = fragment;
}
return {
showRepos: function(options){
$.ajax({
- url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?"
+ url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
, type: 'jsonp'
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
, success: function(data) {
var repos = [];
- if (!data || !data.repositories) { return; }
- for (var i = 0; i < data.repositories.length; i++) {
- if (options.skip_forks && data.repositories[i].fork) { continue; }
- repos.push(data.repositories[i]);
+ if (!data || !data.data) { return; }
+ for (var i = 0; i < data.data.length; i++) {
+ if (options.skip_forks && data.data[i].fork) { continue; }
+ repos.push(data.data[i]);
}
repos.sort(function(a, b) {
var aDate = new Date(a.pushed_at).valueOf(),