|
@ -42,7 +42,6 @@ function queryAPIByUser(apiPath, user, successCallBack, errorCallBack) { |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
type:'GET', |
|
|
type:'GET', |
|
|
url: urlpath, |
|
|
url: urlpath, |
|
|
crossDomain: true, |
|
|
|
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
success: successCallBack, |
|
|
success: successCallBack, |
|
|
error:errorCallBack, |
|
|
error:errorCallBack, |
|
@ -52,27 +51,26 @@ function queryAPIByUser(apiPath, user, successCallBack, errorCallBack) { |
|
|
|
|
|
|
|
|
function queryAPIByOrg(apiPath, org, successCallBack, errorCallBack) { |
|
|
function queryAPIByOrg(apiPath, org, successCallBack, errorCallBack) { |
|
|
const urlpath = APIROOT + API_ORG_PATH + org + apiPath; |
|
|
const urlpath = APIROOT + API_ORG_PATH + org + apiPath; |
|
|
|
|
|
console.log(urlpath); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
type:'GET', |
|
|
type:'GET', |
|
|
url: urlpath, |
|
|
url: urlpath, |
|
|
crossDomain: true, |
|
|
|
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
success: successCallBack, |
|
|
success: successCallBack, |
|
|
error:errorCallBack, |
|
|
error:errorCallBack, |
|
|
timeout: 4000 |
|
|
timeout: 4000 |
|
|
}); |
|
|
}); |
|
|
console.log("past"); |
|
|
|
|
|
} |
|
|
} |
|
|
/* |
|
|
|
|
|
function queryAPIByRepo(apiPath, org, successCallBack, errorCallBack) { |
|
|
|
|
|
const urlpath = APIROOT + API_ORG_PATH + org + apiPath; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function queryUrl(url, successCallBack, errorCallBack) { |
|
|
|
|
|
url = url.split("https://api.github.com/").join("api/"); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
type:'GET', |
|
|
type:'GET', |
|
|
url: urlpath, |
|
|
|
|
|
|
|
|
url: url, |
|
|
crossDomain: true, |
|
|
crossDomain: true, |
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
success: successCallBack, |
|
|
success: successCallBack, |
|
|
error:errorCallBack, |
|
|
error:errorCallBack, |
|
|
timeout: 4000 |
|
|
|
|
|
|
|
|
timeout: 3000 |
|
|
}); |
|
|
}); |
|
|
}*/ |
|
|
|
|
|
|
|
|
} |