These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Need help with a =ImportXML( querry for Google Docs

Author
Florian Bao
Black Box Technologies
#1 - 2012-07-02 11:40:37 UTC  |  Edited by: Florian Bao
Dear knowledgable folk,

could you please help me with the correct ImportXML querry from either eve-central or evemarketeer?

I am trying to generate an output of 90 lines from top to down reading the history data for the last 90 days, but i fail :(

I want to use something like displayed on the evemarketeer -> api -> history section.

a different one, but:
http://eve-marketdata.com/developers/google_docs.php

if i look at that i still cant figure out how to do it :(

anyone can help me?
Muscaat
EVE Markets
#2 - 2012-07-02 13:18:40 UTC  |  Edited by: Muscaat
As far as I'm aware EVE-Central doesn't have a history API.

EVE Marketeer seems to - see http://www.evemarketeer.com/api/history_explanation. You'd need to change both parts of the importXML argument; the first should be the URL of the XML document from EVE Marketeer and the second should be the path within that XML document that contains the data you are interested in. I can't get the API to actually return anything at the moment, it seems to be timing out. EVE-MarketData seems to have a similar API call.

And, because you're the second person today to be asking about that sort of thing, I'll probably be adding a historical-data API to my own site (EVE Markets) in the near future...

EDIT: You updated your post while I was writing mine, more response to come ;)
Florian Bao
Black Box Technologies
#3 - 2012-07-02 13:24:57 UTC
eve-marketdata.com does have history..

but i cant figure out what to change exactly :(

i mean apparantly evemarketeer has a nice history thingy (bottom right)

http://www.evemarketeer.com/item/info/34

wich supports xml

http://www.evemarketeer.com/api/history/34/10000002/xml

json : http://www.evemarketeer.com/api/history/34/10000002/json

and csv: http://www.evemarketeer.com/api/history/34/10000002/csv

but i am too dumb to get the parameters right.
Muscaat
EVE Markets
#4 - 2012-07-02 13:32:54 UTC
Florian Bao wrote:
a different one, but:
http://eve-marketdata.com/developers/google_docs.php

if i look at that i still cant figure out how to do it :(

anyone can help me?


OK, let's see...

Firstly let's work out the data you want to grab from the EVE MarketData API.

From what you say it sounds like you're only dealing with a single item at a time? In which case you'll need its type ID (for example, Tritanium is 34).

Plug that value into the URL in their API documentation and you get something like

http://api.eve-marketdata.com/api/item_history2.xml?char_name=demo&type_ids=34&days=15

(Note that I'm using 15 days here and not 90, because it's a lot faster Blink)

So, that's the first thing you need to give the ImportXML(...) statement.

If you go to that URL in your web browser you can see the actual structure of the data, and you'll need to pass an XPath in to ImportXML that describes how to get to the data you want.

For example: "//row/@avgPrice" should get the average price for each row within the document returned by the API.

Unfortunately I've just tried plugging that in to Google Docs and it completely fails to work, so I've probably taken you as far as I can here Sad
Florian Bao
Black Box Technologies
#5 - 2012-07-02 13:35:06 UTC
hm yeah, thanks .. i tried that aswell, but i fail too :(
Florian Bao
Black Box Technologies
#6 - 2012-07-02 14:16:23 UTC  |  Edited by: Florian Bao
guys! look what I did from

http://www.evemarketeer.com/api/history/34/10000002/xml

=importXML("http://www.evemarketeer.com/api/history/"& $A3 &"/10000002/xml";"/result/row/price_low")

(attention, "& $A3 &" refers to a cell i can input a number (should be the typeID!)


now how do i filter for dates and how do it work that same magic with this:

http://api.eve-marketdata.com/api/item_history2.xml?char_name=demo&type_ids=34&days=15



.... with this one i can make it show the date..

=ImportXML("http://api.eve-marketdata.com/api/item_history2.xml?char_name=demo&type_ids=34&days=15&region_ids=10000002";"/emd")


but what do i need to fill in after the /emd part?
AzAkiR NaLDa
Council of Exiles
Brave Collective
#7 - 2012-07-07 06:04:46 UTC
Also something you want to take into account is that google document is only able to handle 50 queries max. So 90 pulls won't work. It will do the first 50 lines anything after it just doesn't get pulled. I had to work around it for my master sheet which now has 5 other sheets pulling data from eve central on a daily basis.

Lone Star Warrior