Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Eve Solar System List
#Trocar
$eveBaseUrl = "https://api.eveonline.com/";
$eveJumpUrl = ($eveBaseUrl + "map/Jumps.xml.aspx")
$eveKillUrl = ($eveBaseUrl + "/map/kills.xml.aspx")
$eveJumpDoc = New-Object System.Xml.XmlDocument
$eveJumpDoc.Load($eveJumpUrl)
$eveKillDoc = New-Object System.Xml.XmlDocument
$eveKillDoc.Load($eveKillUrl)
$eveSovUrl = ("$eveBaseUrl" + "/map/Sovereignty.xml.aspx")
$eveSovDoc = New-Object System.Xml.XmlDocument
$eveSovDoc.Load($eveSovUrl)
$solarSystems = @{};
select-xml '//row' $eveKillDoc | %{
if($solarSystems.ContainsKey($_.Node.solarSystemId) -eq $false){
$solarSystems[$_.Node.solarSystemId] = New-Object System.Object
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name SolarSystemID -Value $_.Node.solarSystemID -MemberType NoteProperty
};
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name ShipKills -Value $_.Node.shipKills -MemberType NoteProperty
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name FactionKills -Value $_.Node.factionKills -MemberType NoteProperty
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name PodKills -Value $_.Node.podKills -MemberType NoteProperty
}
select-xml '//row' $eveSovDoc | %{
if($solarSystems.ContainsKey($_.Node.solarSystemId) -eq $false){
$solarSystems[$_.Node.solarSystemId] = New-Object System.Object
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name SolarSystemID -Value $_.Node.solarSystemID -MemberType NoteProperty
};
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name AllianceID -Value $_.Node.allianceID -MemberType NoteProperty
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name FactionID -Value $_.Node.factionID -MemberType NoteProperty
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name SolarSystemName -Value $_.Node.solarSystemName -MemberType NoteProperty
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name CorporationID -Value $_.Node.corporationID -MemberType NoteProperty
}
select-xml '//row' $eveJumpDoc | %{
if($solarSystems.ContainsKey($_.Node.solarSystemId) -eq $false){
$solarSystems[$_.Node.solarSystemId] = New-Object System.Object
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name SolarSystemID -Value $_.Node.solarSystemID -MemberType NoteProperty
};
$solarSystems[$_.Node.solarSystemId] | Add-Member -Name ShipJumps -Value $_.Node.shipJumps -MemberType NoteProperty
}
#all the systems
#$solarSystems.Values()
$solarSystems["30000891"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment