Attempt to use new Travis API.
This commit is contained in:
parent
3c6855da81
commit
f4eb8dda34
20
script.js
20
script.js
|
@ -139,11 +139,21 @@ function getBuildDate(build) {
|
|||
}
|
||||
|
||||
function getJSON(url, callback) {
|
||||
return d3.xhr(url)
|
||||
.header("Accept", "application/vnd.travis-ci.2+json")
|
||||
// .mimeType("application/json")
|
||||
.response(function(xhr) { return JSON.parse(xhr.responseText); })
|
||||
.get(callback);
|
||||
return d3.xhr(
|
||||
url,
|
||||
"application/vnd.travis-ci.2+json",
|
||||
function(xhr) {
|
||||
if (xhr.readyState==4 && xhr.status==200) {
|
||||
callback(JSON.parse(xhr.responseText));
|
||||
}
|
||||
}
|
||||
);
|
||||
// With d3 4.0:
|
||||
//return d3.request(url)
|
||||
// //.mimeType("application/json")
|
||||
// .header("Accept", "application/vnd.travis-ci.2+json")
|
||||
// .response(function(xhr) { return JSON.parse(xhr.responseText); })
|
||||
// .get(callback);
|
||||
}
|
||||
|
||||
function updateChart() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user