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

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

Market Discussions

 
  • Topic is locked indefinitely.
 

Google Docs API - How to produce a count of orders

Author
Dixon Cutter
Savvys Corp
#1 - 2013-11-11 05:15:37 UTC
I have been able to pull order data from here:

http://eve-marketdata.com/developers/item_orders2.php

However, I can't figure out how to aggregate and just give a count or recent sell orders (those with largest expiration date). Anyone here knows of a good function that would do that in Google Docs?
Lucas Kell
Solitude Trading
S.N.O.T.
#2 - 2013-11-11 10:46:10 UTC
Dixon Cutter wrote:
I have been able to pull order data from here:

http://eve-marketdata.com/developers/item_orders2.php

However, I can't figure out how to aggregate and just give a count or recent sell orders (those with largest expiration date). Anyone here knows of a good function that would do that in Google Docs?
Not used that API, and not used Google docs in ages, but would you not just pull that data into one sheet, then do your aggregates on a second sheet that refers to the first one, using normal spreadsheet functions?

The Indecisive Noob - EVE fan blog.

Wholesale Trading - The new bulk trading mailing list.

Korsiri
Federal Navy Academy
Gallente Federation
#3 - 2013-11-11 20:26:09 UTC
Lucas Kell wrote:
Dixon Cutter wrote:
I have been able to pull order data from here:

http://eve-marketdata.com/developers/item_orders2.php

However, I can't figure out how to aggregate and just give a count or recent sell orders (those with largest expiration date). Anyone here knows of a good function that would do that in Google Docs?
Not used that API, and not used Google docs in ages, but would you not just pull that data into one sheet, then do your aggregates on a second sheet that refers to the first one, using normal spreadsheet functions?


I use open office, so it's probably different in how the functions operate but that, above, is essentially what I do.
Wafflehead
Garoun Investment Bank
Gallente Federation
#4 - 2013-11-11 21:17:09 UTC
Dixon Cutter wrote:
I have been able to pull order data from here:

http://eve-marketdata.com/developers/item_orders2.php

However, I can't figure out how to aggregate and just give a count or recent sell orders (those with largest expiration date). Anyone here knows of a good function that would do that in Google Docs?


Do yourself a favor and learn PHP & MySQL. Google simplexml :)
Dixon Cutter
Savvys Corp
#5 - 2013-11-13 06:14:44 UTC
Lucas, that would be a good idea, but I want to see automatic count per each of the couple of hundred items that I want to monitor.

Wafflehead, I agree with you 100%. I'm no stranger to coding, but most of it I do in Powershell, and no web stuff so much. I would love to learn PHP, but I don't even know where to start when it comes to dealing with Eve API manipulation. It would be much easier for me to just expand upon some existing framework, and there is so much out there on eve API and PHP, that I'm kinda lost. Is there somewhere that I can find just a very basic set of PHP calls and pages that I can work from?
Hel O'Ween
Men On A Mission
#6 - 2013-11-13 09:17:20 UTC
Dixon Cutter wrote:
I would love to learn PHP, but I don't even know where to start when it comes to dealing with Eve API manipulation.


"EVE API" is basically just a glorified term for "XML file handling". If you know how to deal (=query/filter with XPath) with XML files, you're almost done. Throw in a little database handling to make sense of the ID numbers and you're good to go. I guess that should be doable with PowerShell. I might be mistaken, hough.

EVEWalletAware - an offline wallet manager.

Wafflehead
Garoun Investment Bank
Gallente Federation
#7 - 2013-11-15 11:22:37 UTC
Dixon Cutter wrote:
Lucas, that would be a good idea, but I want to see automatic count per each of the couple of hundred items that I want to monitor.

Wafflehead, I agree with you 100%. I'm no stranger to coding, but most of it I do in Powershell, and no web stuff so much. I would love to learn PHP, but I don't even know where to start when it comes to dealing with Eve API manipulation. It would be much easier for me to just expand upon some existing framework, and there is so much out there on eve API and PHP, that I'm kinda lost. Is there somewhere that I can find just a very basic set of PHP calls and pages that I can work from?


$characterID = "1234";
$keyID = "1234";
$vCode = "abcd1234";
$data = file_get_contents("https://api.eveonline.com/char/MarketOrders.xml.aspx?characterID=$characterID&vCode=$vCode&keyID=$keyID");
$xml = new SimpleXMLElement($data);

if ($xml === false)
{
die('Error parsing XML');
}
//now we can loop through the xml structure
foreach ($xml -> result -> rowset-> row as $row)
{
$orderState = $row['orderState'];
$id = $row['typeID'];
//do stuff here
}