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.
 

Google Spreadsheet, How do you import API information?

First post
Author
Harry Kashuken
State War Academy
Caldari State
#1 - 2015-02-25 20:59:10 UTC
Hello

I have never used google spreadsheets before or the EvE online API. I was wondering how i would pull information (Say the list of all solar systems in a region) and list it in Google Spreadsheet.

I understand this could be a really long answer so if anyone has a link to a tutorial that would also help. I just want to learn how to use the API to its fullest so i can avoid manually entering all the information that could change over time.

Thank you for any help in advance :)
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2015-02-25 21:20:10 UTC
the contents of https://github.com/fuzzysteve/eve-googledocs-script may be of interest.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

salacious necrosis
Garoun Investment Bank
Gallente Federation
#3 - 2015-02-26 03:16:01 UTC
There's at least two separate things you're asking for. One is the static data export (SDE), and the other is the XML API (or CREST for certain things). You can use the SDE from Google Sheets without writing code, but to use the XML API you'll eventually need to write a bit of Google App Script (or slowly go insane).

The specific example you gave, list solar systems in a region, is in the SDE and is a two-liner using the "SDE in a single Google Sheet" that I made here. Here's how (using 'The Forge' as the region):


  1. Create a Google sheet
  2. Enter this in a cell, say A1: https://docs.google.com/spreadsheets/d/1qGEBFpuJOHbnKgHF9KyBzsJTVskwliFwjS-R5BkFf3A/edit
  3. In another cell, enter this formula (this will fill the cell with the region ID of the region you want): =QUERY( IMPORTRANGE($A$1, "mapRegions!A1:B65000"), "select Col1 where Col2 = 'The Forge' limit 1", FALSE)
  4. In yet another cell, enter this formula (I'm assuming B1 is the cell where you entered the previous formula): =QUERY( IMPORTRANGE($A$1, "mapSolarSystems!A1:Z65000"), "select * where Col1 = " & $B$1, 1)


This will list out all the solar systems. Here's a link to an example Google Sheet. I blogged about this here (including short video).

To get specific XML API data, Steve's link has a few short scripts. This is where you'll need to get familiar with the script editor and Google App Script (basically javascript with some extra libraries). If you want to access the entire XML API via Google App Script, you can use the library I wrote which I described here (that post includes a video showing how to use the library).

Good luck!

Use EveKit ! - Tools for EVE Online 3rd party development