| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 1 post(s) |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.04.12 01:16:00 -
[1] - Quote
Hello Forums, I tried searching for my issue first, with no luck.
So here it goes. Since I am new to the Eve API, and to Googledocs spreadsheets, I am trying to make something simple, but its turning out to be more complicated than I thought.
I simply want to pull ship kills in Jita. I have tried many different forms of: =ImportXML("https://api.eveonline.com/map/Kills.xml.aspx?solarSystemID=30000142", "//@shipKills")
What is irritating is that I can browse to https://api.eveonline.com/map/Kills.xml.aspx and search for 30000142 and see how many shipKills it has, but to get googledocs to find it for me seems impossible. 
I tried reading: http://www.w3schools.com/xpath/xpath_syntax.asp and http://wiki.eve-id.net/APIv2_Map_Kills_XML
So far no luck, anyone have any ideas? Thanks in advance  ...Signature... |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.04.12 06:09:00 -
[2] - Quote
Nevermind, I solved it after searching for clues in various forum posts.
The above solution for shipkills in a system was:
=ImportXML("https://api.eveonline.com/map/Kills.xml.aspx", "sum(//row[@solarsystemid=30000142]/@shipkills)")
This now returns the proper ship-kills value for the solar system id.  ...Signature... |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.04.12 06:36:00 -
[3] - Quote
Actually, how would I do multiple systems for LOLz? 
=ImportXML("https://api.eveonline.com/map/Kills.xml.aspx", "sum(//row[@solarsystemid="&JOIN("@solarsystemid=",$A2:$A9)]/@shipkills)")
Do I have JOIN before the xpath or in it like above? (yes my quotes are all messed up and not working)  ...Signature... |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.04.14 07:10:00 -
[4] - Quote
I have come to the conclusion that Eve's API is not xpath compliant (or not useful anyway). Eve-Central (and the rest) have a much easier xpath to work with in Googledocs.
Does anyone know if Crest is going to make Eve's API not be such a pain? I am seriously bummed that I have to ping the API for each solar system I want to look up, instead of just once. This load cannot be good on the server. ...Signature... |

Steve Ronuken
Fuzzwork Enterprises
1288
|
Posted - 2013.04.14 15:23:00 -
[5] - Quote
Eve's API is entirely xpath compliant. Unfortunately, the way it's laid out means dealing with things is a bit of a pain (attributes, rather than values)
The syntax for multiple attribute checks is [@solarsystemid=1 or @solarsystemid=2] so you almost had it. sum(//row[@solarsystemid="&JOIN(" or @solarsystemid=",$A2:$A9)]/@shipkills
should work.
As for CREST, it's not going to, at least initially, change the older api. It's just going to supplement it. The return type will be, I believe, JSON, rather than XML. And I'm not sure how easy it'll be to use with googledocs. Probably hard, due to changing result ids. Steve Ronuken for CSM 8 Handy tools and SDE conversions Twitter: @fuzzysteve on Twitter |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.04.14 18:35:00 -
[6] - Quote
Thank you Steve for the feedback, I get a parse error though, plus it was mad at me for not matching quotes. I think this is really close though, is there more documentation somewhere that I haven't been able to find yet? ...Signature... |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.04.30 02:44:00 -
[7] - Quote
bump for great justice ...Signature... |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.05.21 21:25:00 -
[8] - Quote
I am still hoping someone in the community knows how to fix this please. ...Signature... |

Steve Ronuken
Fuzzwork Enterprises
1434
|
Posted - 2013.05.21 22:09:00 -
[9] - Quote
=ImportXML("https://api.eveonline.com/map/Kills.xml.aspx", "sum(//row[@solarsystemid="&JOIN(" or @solarsystemid=",$A26:$A28)&"]/@shipkills)")
Yes, I screwed up the syntax a little. Teachs me to not test something. 
https://docs.google.com/spreadsheet/ccc?key=0As88qKwn3d59dFZCeS1JblR3VlFLNkpPSnpMTTZZc2c&usp=sharing
I'd have answered earlier, but didn't see this had updated 
WTB forum notifications. Steve Ronuken for CSM 9!-á I'm starting early :) Handy tools and an SDE conversion Twitter: @fuzzysteve on Twitter |

Hustomte
FutureTech Industrial Inc.
98
|
Posted - 2013.05.29 22:21:00 -
[10] - Quote
That is very close to what I wanted, but it sums all the systems into one cell (instead of listing ship kills per hour for each system).
Here is what I have currently (that is inefficient but working) http://bit.ly/117s0BC
Thank you again for your awesome feedback and help! ...Signature... |

Hustomte
FutureTech Industrial Inc.
100
|
Posted - 2013.06.14 03:33:00 -
[11] - Quote
Anyone know how to fix this? ...Signature... |

Hustomte
FutureTech Industrial Inc.
100
|
Posted - 2013.07.26 06:03:00 -
[12] - Quote
Do I need to start a new thread for this?  ...Signature... |

Omega Flames
Last Resort Inn
38
|
Posted - 2013.07.26 13:08:00 -
[13] - Quote
try wrapping the entire import in ARRAYFORMULA() |

Hustomte
FutureTech Industrial Inc.
100
|
Posted - 2013.08.16 06:18:00 -
[14] - Quote
Omega Flames wrote:try wrapping the entire import in ARRAYFORMULA()
I tried using:
Quote:=ARRAYFORMULA(ImportXML("https://api.eveonline.com/map/Kills.xml.aspx", "(//row[@solarsystemid="&JOIN(" or @solarsystemid=",$A2:$A9)&"]/@shipkills)"))
While it does import information, it is not in the order that A2 to A9 would align with, so Jita for example would have its hourly kills listed somewhere else down the list instead of next to its system-id.
I am not sure where its broken, but at least its one-line that does pull information (just incorrectly). ...Signature... |

Fubar
Eagle Eye Inc.
5
|
Posted - 2013.08.16 16:35:00 -
[15] - Quote
We have two problems with this issue
- The Eve API returns the data in different system order for each call.
- Google docs returns data in the order that if finds the solarsystemid in the XML data.
Therefore the kills per system will be in random order every time. |

Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
1808
|
Posted - 2013.08.16 20:56:00 -
[16] - Quote
=importdata("https://www.fuzzwork.co.uk/api/kills.php")
Should do what you want.
It'll pull all the data. (I've set it up so it should match the caching of the eve api)
It'll pull all of the data, in a single line per system, comma seperated. importdata, with continues, will fill out a sheet with all of it.
You can then vlookup it. Steve Ronuken for CSM 9!-á I'm starting early :) Handy tools and an SDE conversion Twitter: @fuzzysteve on Twitter |
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |