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

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

Science & Industry

 
  • Topic is locked indefinitely.
 

How to import eve central data into google docs

First post
Author
Joshua Lonestar
School of Applied Knowledge
Caldari State
#1 - 2015-02-07 19:21:58 UTC  |  Edited by: Joshua Lonestar
So I'm working on a spreadsheet however I cant seem to get any valid values when using importxml functions. Interestingly evwen the URL doesnt load any numbers, so I suspect something is wrong in what I'm requesting from eve central but I sure cant figure it out.

So, the google docs formula is as such, which should return the price of tritanium in Jita.

=IMPORTXML("http://api.eve-central.com/api/marketstat?&typeid=34&usesystem=3000014248","/evec_api/marketstat/type/sell/max")

This returns 0. Not nN/A, but the actual value of "0". When I load just the url in a web browser I also get 0. URL of course being:
http://api.eve-central.com/api/marketstat?&typeid=34&usesystem=3000014248

Anyone havwe any insight as to whats went wrong here? I'm stumped for the moment.

ETA: Never mind, had the wrong system id :/
CJ Alland
CB Trading
#2 - 2015-02-07 21:38:27 UTC
I used to use this technique for importing data but it's slow and prone to lots of issues.

I have a much better way to import market data which I can give you. Message ' Imahna ' ingame.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#3 - 2015-02-07 21:56:24 UTC
https://github.com/fuzzysteve/eve-googledocs-script/blob/master/EveCentralPrices.gs

Smile

Just use google sheets, use the script editor, close the 'new project' window. Then past the contents into the code.gs file

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Sylviria
The Scope
Gallente Federation
#4 - 2015-02-17 13:11:10 UTC
The system you refer to isn't Jita. The Jita system ID is 30000142.
But, if you want to import much data, I'd suggest using Steve's method or use something like this:

=ImportXML("http://api.eve-central.com/api/marketstat?usesystem=30000142&cachebuster=" & Settings!B12 & "&typeid=" & JOIN(",", I2:I52), "//type/sell/min")

Cachebuster refers to a random number that resets the cache, which will make the API reload. Since it will stop loading every now and then. That is an easy workaround.

In column "I", you just put all the ID's of the items you want to import. You just select that column and all the items will import on it's own. Only thing you have to do is fill in the item id in that column.
Tau Cabalander
Retirement Retreat
Working Stiffs
#5 - 2015-02-17 18:23:41 UTC
The EVE Technology forum might be a better place for API discussions.
Holgrak Blacksmith
Prophets of Motav
#6 - 2015-02-18 21:17:11 UTC
I feel your pain. I downloaded Google sheets this afternoon and finished my super slick manufacturing spreadsheet about 15 mins ago. I found it incredibly difficult to find detailed explanations of how the importXML script works. Even now I still can't figure out why my import data only works in specific columns of my spreadsheet.