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) {
|
function getJSON(url, callback) {
|
||||||
return d3.xhr(url)
|
return d3.xhr(
|
||||||
.header("Accept", "application/vnd.travis-ci.2+json")
|
url,
|
||||||
// .mimeType("application/json")
|
"application/vnd.travis-ci.2+json",
|
||||||
.response(function(xhr) { return JSON.parse(xhr.responseText); })
|
function(xhr) {
|
||||||
.get(callback);
|
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() {
|
function updateChart() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user