Skip to content

Commit 0d14d9c

Browse files
committed
Updated Github API to V3.
Github API V2 has been removed. The response data format also changed.
1 parent f5b6df5 commit 0d14d9c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.themes/classic/source/javascripts/github.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ var github = (function(){
1010
return {
1111
showRepos: function(options){
1212
$.ajax({
13-
url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?"
13+
url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
1414
, type: 'jsonp'
1515
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
1616
, success: function(data) {
1717
var repos = [];
18-
if (!data || !data.repositories) { return; }
19-
for (var i = 0; i < data.repositories.length; i++) {
20-
if (options.skip_forks && data.repositories[i].fork) { continue; }
21-
repos.push(data.repositories[i]);
18+
if (!data || !data.data) { return; }
19+
for (var i = 0; i < data.data.length; i++) {
20+
if (options.skip_forks && data.data[i].fork) { continue; }
21+
repos.push(data.data[i]);
2222
}
2323
repos.sort(function(a, b) {
2424
var aDate = new Date(a.pushed_at).valueOf(),

0 commit comments

Comments
 (0)