Skip to content

Commit

Permalink
Create kills.gs
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzysteve committed Jun 14, 2015
1 parent 72255c9 commit 7a278a5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions kills.gs
@@ -0,0 +1,22 @@
/*
https://docs.google.com/spreadsheets/d/17XjDQRArWKfYEA6xWmSwgsE6gDp_Lbj0lZdtxHIFe5A/edit?usp=sharing
*/
function loadKills(){
var kills= new Array();
var url = "https://api.eveonline.com/map/Kills.xml.aspx";
var parameters = {method : "get", payload : ""};
var xmlFeed = UrlFetchApp.fetch(url, parameters).getContentText();
var xml = XmlService.parse(xmlFeed);
if(xml) {
var rows=xml.getRootElement().getChild("result").getChild("rowset").getChildren("row");
for(var i = 0; i < rows.length; i++) {
system=[parseInt(rows[i].getAttribute("solarSystemID").getValue()),
parseInt(rows[i].getAttribute("shipKills").getValue()),
parseInt(rows[i].getAttribute("factionKills").getValue()),
parseInt(rows[i].getAttribute("podKills").getValue()),
]
kills.push(system);
}
}
return kills;
}

0 comments on commit 7a278a5

Please sign in to comment.