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 docs error when pulling corp assets with api also job opp :-)

First post
Author
princess abbie
Pator Tech School
Minmatar Republic
#1 - 2015-03-10 12:01:10 UTC  |  Edited by: princess abbie
ErrorWrong number of arguments to IMPORTXML. Expected 2 arguments, but got 1 arguments.

https://api.eveonline.com/corp/WalletJournal.xml.aspx?keyID=xxxxxxx&vCode=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&characterID=xxxxxxxxx&rowCount=25

i am new to api just testing out some functions

also when i import into google docs will it make to readable instead of a block of writing???

please any one willing to help we are starting up a project and need some people to help code some stuff, we will give you share of company earnings when we are setup

and can give a lil isk towards now but not loads :-)

i have all server space we may need and such :-)

skype jamie.farrar2

please message if you can help with coding :-)

will need a website that allows registration only from in-game browser, which pulls account info when they register and stores it to a db for use when cop wallet is queried :-)

any help how to fix this initial issue please would be helpful
princess abbie
Pator Tech School
Minmatar Republic
#2 - 2015-03-10 12:02:36 UTC
this is my reference documentation how i got to where i am so far

http://wiki.eve-id.net/APIv2_Char_JournalEntries_XML
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#3 - 2015-03-10 12:18:42 UTC
importxml is bad. it's unreliable, and it's difficult to get multiple values per row, without a lot of work

An alternate method is a custom function, like the one below, for assets.
https://github.com/fuzzysteve/eve-googledocs-script/blob/master/assetloader.gs

I haven't written one for the wallet though.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

salacious necrosis
Garoun Investment Bank
Gallente Federation
#4 - 2015-03-11 13:00:51 UTC
What Steve said...

If you're willing to invest in learning a little Google App Script (nee Javascript), then this is pretty easy to handle. I posted a library for calling the XML API from Google App Script here.

If you just want to cut to the chase, make a copy of this Google doc, enter a valid key, vcode and character ID to the right of the named cells, put "charWalletJournal" in the function field, then select EveKit -> Retrieve data to pull the data.

The code is very simple, all the hard work is in the library. Select Tools -> Script editor... to see the code.

For wallet, this only gets the first pull. You'll need to "walk" the wallet to get everything else. That's described here.

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

princess abbie
Pator Tech School
Minmatar Republic
#5 - 2015-03-11 16:43:59 UTC
are either of you able to talk to me on skype and discuss the project that we are doing and see if you would be available to help us out, i dont have a lot of isk atm but there will be fantastic benefits of helping to create the working project, my cousin is much better with code stuff he is a programmer so between him and 1 of you we should be able to get stuff setup and working for testing purposes

obviously it would mean some work in trust but can write up contracts and such to outline rights within the business :-)

let me know my skype again is jamie.farrar2
princess abbie
Pator Tech School
Minmatar Republic
#6 - 2015-03-11 20:16:42 UTC
also i managed to get the original script working with help from eve uni

i set the url in cell a1 and then referenced the cell and set the =importxml(A1, "//rowset/row/@ownername1")

in each column that i wanted the information and it working good for now but this is only the basic frame work we are willing to change how this works for the main project of course to make it all secure and streamlined
Nolen Cadmar
Caldari Provisions
Caldari State
#7 - 2015-03-12 16:30:27 UTC  |  Edited by: Nolen Cadmar
princess abbie wrote:
also i managed to get the original script working with help from eve uni

i set the url in cell a1 and then referenced the cell and set the =importxml(A1, "//rowset/row/@ownername1")

in each column that i wanted the information and it working good for now but this is only the basic frame work we are willing to change how this works for the main project of course to make it all secure and streamlined

Did you forget the comma? or not put the url in quotes?

Putting things in quotes works the same as referencing another cell. The below should work.

=importxml("api.eveonline.com/corp/walletjournal.xml.aspx?keyid=XXX&vcode=XXX&rowcount=25",//rowset/row/@ownername1")

If you wanted to make it easier to change the values, you could do something like this:

=importxml(concatenate("api.eveonline.com/corp/walletjournal.xml.aspx?keyid=",A1,"&vcode=",A2,,"&rowcount=",A3),//rowset/row/@ownername1")

A1=key ID
A2=vCode
A3=rowCount

Change the values in A1→A3, and the import will refresh accordingly.

Nolen's Spreadsheet Guru Services

Pre-made spreadsheets available covering market, manufacturing and more!

Custom requests welcome!

Sheet Screenshots

princess abbie
Pator Tech School
Minmatar Republic
#8 - 2015-03-12 16:45:07 UTC
nolen u in game??
Zad Murrard
Frozen Dawn Inc
Frozen Dawn Alliance
#9 - 2015-03-23 06:26:53 UTC  |  Edited by: Zad Murrard
If you're getting errors with importXML, you can try importXML2. eg. http://pastebin.com/gfUn8j8z
(corp example query has invalid keys, won't work)
Might have bugs and missing some xpath features. Unlike the original version this one cares about correct casing.

Supports somehow also getting multiple values with one query eg.
=importxml2(A1, "//row/@something | //row/@somethingElse")