Pages: 1 2 3 :: [one page] |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Lumy
Minmatar eXceed Inc. Minor Threat.
|
Posted - 2009.04.04 22:51:00 -
[1]
0.50 RELEASE IS HERE
I'll try to keep this short. We have new release of Ale just for you. Currently marked as 0.5 RC1 (code name: Lumy's revenge) brings you:
- Complete OOP redesign
- Errors handling by exceptions. As God intended.
- Highly configurable. But you don't have to modify library.
- Multiple cache plugins. File system, raw MySQL, ADOdb and more possible.
- Curl or fsock http request plugins. Whatever your hosting supports.
- Easy to use. Just include single file and use factory to build you object by your preference.
- Dynamic API calls. No more waiting for update when CCP release new API.
- Specialized XML parser. Access <rowset> elements by their name and use them as array. And few more neat features.
Note that this is release candidate. Though I'm using it for few of my project, there might be few bugs that need to be eradicated.
Eve-apiphp is currently undergoing rename to eve-ale on sourceforge. If the links get broken, change probably kicked in. I'll be watching and try correct links ASAP.
Links:
Project site
Example code
Documentation
Report bugs here
Need help? Ask here or use this thread.
Enjoy.
Joomla! in EVE - IGB compatible CMS. |
Adrielle Firewalker
Minmatar WASTELAND MINERS Inc.
|
Posted - 2009.04.07 00:54:00 -
[2]
Yay Lumy ================
~Adrielle
Original MinmatarT |
Eons Fairlight
|
Posted - 2009.04.08 18:00:00 -
[3]
Thanks for the library, it took me a while to figure out how to use it tho.
I'm in the process of writing an accounting style webapp and my first step was to get my Wallet Transactions. The example code link above didnt help me that much and was confused by the old style used in eve-apiphp. Here's some example code that will hopefully help out other coders who might encounter the same confusion i did.
This code is rather pointless but it shows syntax for traveling "rowset"s
$ale = AleFactory::getEVEOnline(); $ale->setCredentials($apiuser, $apipass); try { $account = $ale->account->Characters(); foreach ($account->result->characters as $character) { $characterID = (string)$character->characterID; if ($mychar == (string)$character->name) { $ale->setCharacterID($characterID); $characterData = $ale->char->CharacterSheet(); $balance = number_format((string)$characterData->result->balance, 2); } }
$marketData = $ale->char->WalletTransactions();
foreach ($marketData->result->transactions as $transaction){ $time = $transaction->transactionDateTime; $quantity = $transaction->quantity; $itemName = $transaction->typeName; etc...
} } catch (Exception $e){ echo $e->getMessage(); }
Hope this helps someone.
|
Lumy
Minmatar eXceed Inc. Minor Threat.
|
Posted - 2009.04.08 19:38:00 -
[4]
Yep, I suck at writing docs. I have added two more examples:
Get CorporationSheet using corporationID
Nestet <rowset> elements in KillLog
Joomla! in EVE - IGB compatible CMS. |
Tonto Auri
Vhero' Multipurpose Corp
|
Posted - 2009.04.08 21:07:00 -
[5]
Edited by: Tonto Auri on 08/04/2009 21:07:24 Reading through CHANGES... just curious - are you going to have it ready for PHP 5.3? :)
EDIT: phpDocumenter ftw ^_^ -- Thanks CCP for cu |
Lumy
Minmatar eXceed Inc. Minor Threat.
|
Posted - 2009.04.08 21:29:00 -
[6]
Originally by: Tonto Auri Edited by: Tonto Auri on 08/04/2009 21:07:24 Reading through CHANGES... just curious - are you going to have it ready for PHP 5.3? :)
EDIT: phpDocumenter ftw ^_^
Code is E_STRICT, so it should be fine. I don't expect to use any new 5.3 features. Namespaces would break backward compatibility. Every class and constant uses Ale- prefix, so it should be fine in almost all cases. Library doesn't extend any classes with static methods, so no need for late static binding.
I guess (persistent) mysqli cache would be nice. Will have a look at it.
Joomla! in EVE - IGB compatible CMS. |
Syringe
Oedipus Complex
|
Posted - 2009.04.24 20:58:00 -
[7]
I'll be dissecting this thing for my drupal integration. You want me to follow through with documentation? --------- War isn't the answer. However, the objective isn't to provide answers rather than eliminate the question. |
Lumy
Minmatar eXceed Inc. Minor Threat.
|
Posted - 2009.04.24 21:32:00 -
[8]
Originally by: Syringe Edited by: Syringe on 24/04/2009 21:14:43 Thanks for the work on this release - you're a badass Lumy.
I'll be dissecting this thing for my drupal integration. You want me to follow through with documentation?
I hope only thing you'll have to do is to implement Drupal cache. Either implement AleInterfaceCache interface, or extend AleCacheAbstractDB class. Dunno which will suit you better (never coded Drupal extensions).
If you're willing to send final class to me, I'll gladly include it to library. Any contribution is welcome.
Joomla! in EVE - IGB compatible CMS. |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.04.25 22:42:00 -
[9]
Quick update:
Added new class for EVE Central API. Example:
require_once 'ale/factory.php'; $ale = AleFactory::getEVECentral();
$params = array('typeid'=>array(34,35)); $xml = $ale->marketstat($params);
$params = array('typeid'=>34); $xml = $ale->quicklook($params);
$xml = $ale->evemon();
IMPORTANT: Always use config option "request.flattenParams = true". This will allow you to request multiple itemid-s in single request and more importantly, you won't get 417 server error. Cache time is in seconds from time of last uncached call. Option main.cacheTime. If you don't want to use cache, set cache.class to "Dummy".
Enjoy.
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2009.04.26 18:01:00 -
[10]
Edited by: Iyotaka on 26/04/2009 18:07:17 Edited by: Iyotaka on 26/04/2009 18:06:04 Guess I am the first one to follow the "bug" link.
Only textual, and maybe a different naming convention.
As I have not used the old api ever (needed an updated PHP which I know have) I'll be providing feedback as I can, bug or no bug.
Edit: Ran your simple program from the command-line, just to test. In one way, looks promising, but do I have to recompile (will require lots of work) to get curl, or is there a way around using curl - e.g. a different call. I recall reading for the old versions of eveapi that there were also "curl-less" versions.
<font color=ff0000> Fatal error: Uncaught exception 'LogicException' with message 'Curl extension is missing' in /htdocs/eveapi/ale/request/curl.php:38 Stack trace: #0 /htdocs/eveapi/ale/factory.php(138): AleRequestCurl->__construct(Array) #1 /htdocs/eveapi/ale/factory.php(158): AleFactory::init('EVEOnline', Array) #2 /htdocs/eveapi/ale/factory.php(187): AleFactory::get('EVEOnline', Array, false) #3 /htdocs/eveapi/ale/simple_ale(5): AleFactory::getEVEOnline() #4 {main} thrown in /htdocs/eveapi/ale/request/curl.php on line 38 </font>
|
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.04.26 20:01:00 -
[11]
Edited by: Lumy on 26/04/2009 20:03:06 That's why do we have multiple http request connectors here ;)
Just go to eveonline.ini and set
[request] class= "Fsock"
or you can pass override in config array
$config = array('request.class' => 'Fsock'); $ale = AleFactory::getEVEOnline($config);
edit: or you can try to install curl
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2009.04.26 20:26:00 -
[12]
Edited by: Iyotaka on 26/04/2009 20:37:44 Edited by: Iyotaka on 26/04/2009 20:34:14 very nice. I'll try that.
p.s. sent an ingame message - basically, if I have the time, I'll test and maybe work on documentation.
Edit: speaking of documentation - simple program returns:
Table 'ale.alecache' doesn't exist
I thought enough to create the user and the database, but without installation documentation (only one line in the wiki - unpack the zip file) no idea what the tables should look like.
I'll check for a sql file (now) - but here I stumbled.
edit2: found directory sql, and used the file there to create the database. Running from the command line, the simple program does not generate any output. So, I"ll work on a new sort of "Hello World" simple program to test if it is up and runnable.
|
Hiro Kator
|
Posted - 2009.05.06 13:24:00 -
[13]
Edited by: Hiro Kator on 06/05/2009 13:25:08 Hello,
and thanks for the library. It was a bit tricky to get it working, but it does now.
I don't mean to sound stupid, but I have no idea how the thing works. What I do not understand is how you can make a call like this:
$ale = AleFactory::getEVECentral();
$params = array('typeid'=>array(34,35)); $xml = $ale->marketstat($params);
When, in my humble opinion, marketstat-function is nowhere to be defined in the class AleEVECentral (which is defined the file evecentral.php).
Could someone give me a simple example, which fetches the given characters assets (using extended api key) and prints them?
I will probably use ALE through HAXE anyway, so it's not that important that I get the lib 100%.
Thank you in advance.
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.05.06 14:01:00 -
[14]
Both AleEVEOnline and AleEVECentral generates methods dynamically. Example: http://api.eveonline.com/example/call.xml.aspx translates to $eo_ale->example->call(); http://api.eve-central.com/api/examplecall translates to $ec_ale->examplecall();
For all available calls see documentation at EVE Central and EVE Development Network
There is one more complicated example here: http://sourceforge.net/docman/display_doc.php?docid=174933&group_id=233060. It's for KillLog, but I hope you'll get an idea. When in doubt, you can always transform result to array using $xml->toArray() (works only for EVE Online).
Hope it helps.
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2009.05.15 06:45:00 -
[15]
Edited by: Iyotaka on 15/05/2009 06:47:50 Just curious. Doing a lot of examination or research as to hall the code works. I have been looking through the code and must learn how all those __construct functions work. That must be how you are translating all the "undefined" methods.
And now a question, and a request.
The program is called as: ./IY.php >IY.txt
The first time I run the program (or cache has expired) the following code snippet
Quote:
$account = $ale->account->Characters(); print_r($account);
Starts out with the SQL code (e.g.)
Quote:
INSERT INTO alecache (content, cachedUntil, host, path, params) VALUES ('<?xml version=\'1.0\' encoding=\'UTF-8\'?>\r\n<eveapi version=\"2\">\r\n <currentTime>2009-05 -15 06:06:37</currentTime>\r\n <result>\r\n <rowset name=\"characters\" key=\"characterID\" columns=\"name,characterID,corporationName,corporationID\">\r\n <r ow name=\"Iyotaka\" characterID=\"684446508\" corporationName=\"Iyotaka Union\" corporationID=\"1201989246\" />\r\n .... snip ....
and then starts with what I expected:
Quote:
AleParserXMLElement Object ( [name:private] => eveapi [data:private] => SimpleXMLElement Object ... snip ...
And it does the same for the following code - which amazes me even more!
Quote:
//you can traverse <rowset> element with attribute name="characters" as array echo "name/characterID corp/corpID\n"; foreach ($account->result->characters as $character) { //this is how you can get attributes of element $characterID = (string) $character->characterID; $name = (string) $character->name; $corpID = (string) $character->corporationID; $corpName = (string) $character->corporationName; echo "$name/$characterID $corpName/$corpID\n"; //set characterID for CharacterSheet $ale->setCharacterID($characterID); $characterSheet = $ale->char->CharacterSheet(); // print_r($characterSheet);
Quote:
name/characterID corp/corpID Iyotaka/684446508 Iyotaka Union/1201989246 INSERT INTO alecache (content, cachedUntil, host, path, params) VALUES ('<?xml version=\'1.0\' encoding=\'UTF-8\'?>\r\n<eveapi version=\"2\">\r\n <currentTime>2009-05 -15 06:06:37</currentTime>\r\n <result>\r\n <characterID>684446508</characterID>\r\n <name>Iyotaka</name>\r\n <race>Amarr</race>\r\n .... snip ....
The second run produces the expected AleParserXMLElement Object and just this:
Quote:
name/characterID corp/corpID Iyotaka/684446508 Iyotaka Union/1201989246
Note: I am not printing the characterSheet in the test - generates unneeded output - which is why I am surprised by the SQL output.
And lastly, a request. The SQL code it generates, especially with eve-central (getting all Trit sales for examples) creates a ridiculously long line - too large for my SQL server - complains of a transaction buffer overflow, or something like that - which makes it fail (I guess I may need to disable cacheing as a solution?). However, I would also much prefer an INSERT command that is not trying to INSERT everything as a single command(line) - although that probably makes your alecache statement a lot simplier. Still, it would be very nice if the output had a few more line-breaks in it. Or at least an option to affect the layout when "debugging".
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.05.15 08:49:00 -
[16]
Actually, __construct() is a constructor. It changed from PHP4, where constructor was function named as class itself. http://php.net/manual/en/language.oop5.decon.php
For unnamed attributes and methods see __get and __call methods and AleUtilContext class. AleUtilContext is responsible for chaining section->call(). http://php.net/manual/en/language.oop5.overloading.php
The cache is intentionally simple and oblivious to structure of data. Otherwise I would have to code separate cache logic for every call. But nothing prevents you to make your own cache . Large amounts of data might be a problem, especially when you don't have access to db configuration. I'll add another config option for DB caches: maxDataSize (or something) to ignore larger data. Hopefully this weekend.
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2009.05.15 09:35:00 -
[17]
thanks for the links. I am just switching to PHP5 logic, and am missing the ease I could used Class::method(arg) for doing a query e.g..
I am hoping I'll find what I need there.
And the maxDataSize sounds like an excellent option.
Making my own cache - interesting challange - I'll wait for your maxData fix, look at the differences, and then have a better idea where I need to be looking.
It might be real easy
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.05.15 10:14:00 -
[18]
Btw, what version/config you're using? RC2/cache.class=mysql? I'm just checking code and I don't one fkin reason why should the library dump SQL into output.
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2009.05.16 16:50:00 -
[19]
Edited by: Iyotaka on 16/05/2009 16:51:00 This is the downloaded link - so I assume it is RC2.
I tried grep -i version but got nothing sensible.
http://sourceforge.net/project/showfiles.php?group_id=233060&package_id=307334&release_id=678386 - the Forge pages dates it as 25 April
When I set cache to Files it seems to be working better.
|
Clark Manson
|
Posted - 2009.06.10 02:05:00 -
[20]
Edited by: Clark Manson on 10/06/2009 02:10:16 Getting this...any ideas? Trying to get character sheet of second pilot on account when this happens. Pilot just so happens to be me...so no weird things with the name or anything.
Fatal error: Uncaught exception 'AleExceptionCache' in /ale/cache/mysql.php:62 Stack trace: #0 /ale/cache/abstractdb.php(82): AleCacheMySQL->execute('SELECT * FROM a...') #1 /ale/base.php(133): AleCacheAbstractDB->setCall('char/CharacterS...', Array) #2 /ale/base.php(116): AleBase->retrieveXml('char/CharacterS...', Array) #3 /ale/eveonline.php(214): AleBase->_retrieveXml(Array, Array) #4 /ale/util/context.php(53): AleEVEOnline->_retrieveXml(Array, Array) #5 [internal function]: AleUtilContext->__call('CharacterSheet', Array) #6 /ale/register.php(137): AleUtilContext->CharacterSheet() #7 {main} thrown in /ale/cache/mysql.php on line 62
Code snippet that it is running in register.php is as follows (this runs fine with the first character)
$account = $ale->account->Characters(); foreach ($account->result->characters as $character) { $characterID = (string) $character->characterID; echo("characterID: ".$characterID."<br/>"); $ale->setCharacterID($characterID); $xml = $ale->char->CharacterSheet(); //<----line 137 code that is breaking }
|
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.06.10 10:26:00 -
[21]
Edited by: Lumy on 10/06/2009 10:29:22 Hi. Use "try { } catch ( ) { }" block to display error message. See this example http://sourceforge.net/docman/display_doc.php?docid=174326&group_id=233060. This will show whole SQL error, which will be more helpfull. Post it here please, or file a bug report.
Joomla! in EVE - IGB compatible CMS. |
Clark Manson
|
Posted - 2009.06.11 03:02:00 -
[22]
Originally by: Lumy Edited by: Lumy on 10/06/2009 10:29:22 Hi. Use "try { } catch ( ) { }" block to display error message. See this example http://sourceforge.net/docman/display_doc.php?docid=174326&group_id=233060. This will show whole SQL error, which will be more helpfull. Post it here please, or file a bug report.
I removed the try-catch because it was not displaying anything....this was the only way I could get any feedback at all.
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.06.11 11:13:00 -
[23]
Originally by: Clark Manson
Originally by: Lumy Edited by: Lumy on 10/06/2009 10:29:22 Hi. Use "try { } catch ( ) { }" block to display error message. See this example http://sourceforge.net/docman/display_doc.php?docid=174326&group_id=233060. This will show whole SQL error, which will be more helpfull. Post it here please, or file a bug report.
I removed the try-catch because it was not displaying anything....this was the only way I could get any feedback at all.
No wai.
catch (Exception $e) { echo $e->getMessage(); }
should print error message from MySQL server. Unless you instantly redirect script to another page or something. Anyway this should give more info: turn on error_reporting to E_ALL and set display_errors to true. If it doesn't help, go to /ale/cache/mysql.php:62 and print mysql_error directly and let script die().
Please let me know what you'll find.
Joomla! in EVE - IGB compatible CMS. |
Clark Manson
|
Posted - 2009.06.12 02:59:00 -
[24]
Originally by: Lumy
Originally by: Clark Manson
Originally by: Lumy Edited by: Lumy on 10/06/2009 10:29:22 Hi. Use "try { } catch ( ) { }" block to display error message. See this example http://sourceforge.net/docman/display_doc.php?docid=174326&group_id=233060. This will show whole SQL error, which will be more helpfull. Post it here please, or file a bug report.
I removed the try-catch because it was not displaying anything....this was the only way I could get any feedback at all.
No wai.
catch (Exception $e) { echo $e->getMessage(); }
should print error message from MySQL server. Unless you instantly redirect script to another page or something. Anyway this should give more info: turn on error_reporting to E_ALL and set display_errors to true. If it doesn't help, go to /ale/cache/mysql.php:62 and print mysql_error directly and let script die().
Please let me know what you'll find.
Yes Wai
At any rate, after only adding error_reporting(E_ALL); ini_set("display_errors", 1);
and commenting out line 62, I am unable to reproduce the problem. I think I will leave those changes in for now...thanks. to my code, I am unable to reproduce the problem.
|
Percivs
Rule of Five The Junta
|
Posted - 2009.07.16 06:47:00 -
[25]
Lumy,
I can get the ec_ale call to work using the sample code;
<?php require_once '/home/server/cron/eve/ale/factory.php'; //get ALE object $ale = AleFactory::getEVECentral(); $params = array('typeid'=>array(34,35)); try { $xml = $ale->marketstat($params); } catch (Exception $e) { echo $e->getMessage(); } ?>
However, I cannot figure out how to access the results (and as you said above, there is no $xml->to_array call for the ec_ale implmentation.)
(This result is retrieved manually from http://api.eve-central.com/api/marketstat?typeid=34&typeid=35«ionlimit=10000002)
<?xml version="1.0" encoding="utf-8" ?> - <!-- Automatically generated data from EVE-Central.com --> - <!-- This is the new API :-) --> - <evec_api version="2.0" method="marketstat_xml"> - <marketstat> - <type id="34"> - <all> <volume>59434699454</volume> <avg>27.0471468244</avg> <max>11155.08</max> <min>0.3</min> <stddev>458.683518273</stddev> <median>4.13</median> </all> - <buy> <volume>13345712573</volume> <avg>3.8439031402</avg> <max>4.05</max> <min>0.3</min> <stddev>0.569185707614</stddev> <median>3.81</median> </buy> - <sell> <volume>46088986881</volume> <avg>4.2165384537</avg> <max>11155.08</max> <min>3.65</min> <stddev>497.597676035</stddev> <median>4.14</median> </sell> </type> - <type id="35"> - <all> <volume>14836130256</volume> <avg>4.07758552632</avg> <max>12.6199</max> <min>1.5</min> <stddev>0.80920055546</stddev> <median>4.01</median> </all> - <buy> <volume>9414047820</volume> <avg>3.90210952555</avg> <max>4.6</max> <min>1.5</min> <stddev>0.376084769977</stddev> <median>3.87</median> </buy> - <sell> <volume>5422082436</volume> <avg>4.50796986092</avg> <max>12.6199</max> <min>3.9</min> <stddev>1.00233444314</stddev> <median>4.225</median> </sell> </type> </marketstat> </evec_api>
however, I cannot determine how to walk the XML structure using ALE.
Would you (or someone) please give me some examples?
Specifically:
How do I reference the current typeid from the XML (to match to a invType.itemName lookup)? e.g.; $xml->marketstat-> ?
How do I reference the all,buy,sell branches of the XML data? e.g.; $xml->marketstat-> ? ->buy->avg; or e.g.; $xml->marketstat-> ? ->sell->avg;
(I'm pretty sure that my attempt at providing a pseudo example of what I'm looking for is completely wrong and that there is going to need to be a foreach() call to walk the rows... but I'm at a loss at the moment and hoping for a ray of sunshine to light the way.)
I have some additional questions, but I think if I can get past the questions asked above, I will probably be able to figure out the rest on my own.
Awesome framework and thanks in advance! --- "All of us who are concerned for peace and triumph of reason and justice must be keenly aware how small an influence reason and honest good will exert upon events in the political field" - A.E. |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.07.16 16:31:00 -
[26]
Edited by: Lumy on 16/07/2009 16:34:58 Hi. Eve Central returns SimpleXMLElement object.
//you have to use children() method, if element contains multiple elements of the same name foreach ($xml->marketstat->children() as $type) { //you can get name of element echo $type->getName();
//if it contains only elements with different names, you can access it as property of object //and don't forget to cast type to string echo (string) $type->all->volume; //this is how you can access attributes $attributes = $type->attributes(); echo $attributes['id'];
I hope this helps.
Joomla! in EVE - IGB compatible CMS. |
Percivs
Rule of Five The Junta
|
Posted - 2009.07.18 22:16:00 -
[27]
Lumy;
Awesome, thanks! --- "All of us who are concerned for peace and triumph of reason and justice must be keenly aware how small an influence reason and honest good will exert upon events in the political field" - A.E. |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.08.05 21:35:00 -
[28]
Little update: Version 0.50.1 is up. Now with PostgreSQL cache plugin. Thanks to Luna Harkor.
Joomla! in EVE - IGB compatible CMS. |
Aedrine
|
Posted - 2009.08.17 14:18:00 -
[29]
Hello there,
Thanks for the good work! How do I complitely disable the sql part of the api? I'm happy to handle XML files and would rather do that.
I get:
Quote: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /blabla/mysql.php on line 41
it's normal as I haven't set it up, just looking into how not to get that :)
Thx
|
Dragonaire
Caldari Corax. New Eden Retail Federation
|
Posted - 2009.08.17 14:39:00 -
[30]
Aedrine if you just want the raw XML to start with why are you trying to use a library when you can just grab the XML directly from API if that's what you want -- Finds camping stations from the inside much easier. Designer of Yapeal for Eve API.
|
|
Conrad Lionhart
Gallente
|
Posted - 2009.08.26 07:32:00 -
[31]
Heya, I got ALE working, but I would like to make a few suggestions:
The Basic Installation Test is a good idea, but I think there are a few steps that you could add in.
For example, your Basic Installation Test assumes that the user's mysql database doesn't have a password, uses the database named "test", and uses the table in it named alecache. I assume this is the case based on the default settings in eveonline.ini
However, for someone like me, who knows php, mysql and html, but is very new to EVE API, I was a bit confused. My MySQL does have a password, I don't have a database named test, and I most certainly don't have a table in it named alecache. Only after creating the alecache table and changing the settings in eveonline.ini, I could get it running.
So I would like to recommend that the Basic Installation Test page include these steps: 1. the mysql command lines to create the "test" database (I recommend a database named "eve" instead) and the alecache table 2. a mention of the eveonline.ini or evecentral.ini and what they do 3. an advise to change the settings in eveonline.ini or evecentral.ini to get it working
My Blog: http://www.brugamers.com/index.php?blog=43 |
Conrad Lionhart
Gallente
|
Posted - 2009.08.26 07:45:00 -
[32]
Originally by: Aedrine Hello there,
Thanks for the good work! How do I complitely disable the sql part of the api? I'm happy to handle XML files and would rather do that.
I get:
Quote: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /blabla/mysql.php on line 41
it's normal as I haven't set it up, just looking into how not to get that :)
Thx
Aedrine, try configuring your mysql settings in the eveonline.ini file, in the ale directory. The setting are under [cache].
My Blog: http://www.brugamers.com/index.php?blog=43 |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.08.26 09:47:00 -
[33]
Originally by: Aedrine Hello there,
Thanks for the good work! How do I complitely disable the sql part of the api? I'm happy to handle XML files and would rather do that.
I get:
Quote: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /blabla/mysql.php on line 41
it's normal as I haven't set it up, just looking into how not to get that :)
Thx
You can either use File cache
[cache] class= "File" rootdir= "/path/to/cache/directory/ Or you can bypass caching system system completely
[cache] class= "Dummy"
If you want to get raw XML string, aset
parserClass= "string" Here you can find some documentation.
Joomla! in EVE - IGB compatible CMS. |
Dedo 93
|
Posted - 2009.08.27 15:32:00 -
[34]
Hi.. i've a problem with the library.... this is the error: [http://api.eve-online.com/account/Characters.xml.aspx] Server Response Error::Forbidden i've just downloaded the last version and modified the MySQL's infos in the eveonline.ini and put all the files in /ale
the code I use in / is:
require_once 'ale/factory.php'; //get ALE object try { $ale = AleFactory::getEVEOnline(); //set user credentials, third parameter $characterID is also possible; $ale->setCredentials($userID, $apiKey); //all errors are handled by exceptions //let's fetch characters first. $account = $ale->account->Characters(); //you can traverse <rowset> element with attribute name="characters" as array foreach ($account->result->characters as $character) { //this is how you can get attributes of element $characterID = (string) $character->characterID; //set characterID for CharacterSheet $ale->setCharacterID($characterID); $characterSheet = $ale->char->CharacterSheet(); } } //and finally, we should handle exceptions catch (Exception $e) { echo $e->getMessage(); }
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.08.27 18:24:00 -
[35]
Originally by: Dedo 93 Hi.. i've a problem with the library.... this is the error: [http://api.eve-online.com/account/Characters.xml.aspx] Server Response Error::Forbidden i've just downloaded the last version and modified the MySQL's infos in the eveonline.ini and put all the files in /ale
Hmm, looks like PHP cannot connect to http://api.eve-online.com/ for whatever reason - it's getting 403 Forbidden response (Note to myself: make better error descriptions). Honestly, I don't know what could be the problem. Just wild guessing: firewall, you're behind proxy, something wrong with PHP/configuration, temporary glitch...
You could try to switch to fsock connector, if it helps. Set
[request] class= "Fsock" In your .ini file. Sorry, i'm kinda in dark here.
Joomla! in EVE - IGB compatible CMS. |
Luna Harkor
|
Posted - 2009.08.27 21:03:00 -
[36]
Edited by: Luna Harkor on 27/08/2009 21:08:05 Edited by: Luna Harkor on 27/08/2009 21:04:42 Lumy,
I found an issue with the PostgreSQL caching component that was causing periodic issues with insertions, the offending code is in the pgsql.php cache file and is the execute function:
protected function &execute($query) { if (preg_match("/INSERT INTO alecache \(content, cachedUntil/", $query)) { $query = preg_replace('/content, cachedUntil/', 'content, "cachedUntil"', $query); }
$result = pg_query($this->db, $query); if ($result === false) { throw new AleExceptionCache(pg_last_error($this->db), pg_result_status($result)); } return $result; }
is the fixed varient.
This is, by no means, a clean fix, but because of how different PostgreSQL and MySQL deal with column cases, this was the easiest fix that did not require a complete re-write of the query execution engine.
Edit: note, the formatting here is not what I had posted, but eve-o has re-formatted it on my and it wont correct.
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.08.27 23:05:00 -
[37]
Originally by: Luna Harkor Edited by: Luna Harkor on 27/08/2009 21:08:05 Edited by: Luna Harkor on 27/08/2009 21:04:42 Lumy,
I found an issue with the PostgreSQL caching component that was causing periodic issues with insertions, the offending code is in the pgsql.php cache file and is the execute function:
protected function &execute($query) { if (preg_match("/INSERT INTO alecache \(content, cachedUntil/", $query)) { $query = preg_replace('/content, cachedUntil/', 'content, "cachedUntil"', $query); }
$result = pg_query($this->db, $query); if ($result === false) { throw new AleExceptionCache(pg_last_error($this->db), pg_result_status($result)); } return $result; }
is the fixed varient.
This is, by no means, a clean fix, but because of how different PostgreSQL and MySQL deal with column cases, this was the easiest fix that did not require a complete re-write of the query execution engine.
Edit: note, the formatting here is not what I had posted, but eve-o has re-formatted it on my and it wont correct.
Thanks for letting me know. But I won't be adding this to SVN, instead I'll try to properly quote all names. Just to make sure, tables in PostgreSQL can be quoted, right? I assume "mydb"."alecache" is equivalent of MySQL `mydb`.`alecache`.
Joomla! in EVE - IGB compatible CMS. |
Luna Harkor
|
Posted - 2009.09.05 18:29:00 -
[38]
Originally by: Lumy
Thanks for letting me know. But I won't be adding this to SVN, instead I'll try to properly quote all names. Just to make sure, tables in PostgreSQL can be quoted, right? I assume "mydb"."alecache" is equivalent of MySQL `mydb`.`alecache`.
Correct, table and column names can be quoted, not entirely certain on database names however.
|
Anne Sapyx
Gallente Insurgent New Eden Tribe Systematic-Chaos
|
Posted - 2009.11.09 09:50:00 -
[39]
Originally by: Lumy Here you can find some documentation.
404 Error û Page Not Found
--------------------------------
Elite, is quite simply, the best game ever made. http://www.iancgbell.clara.net/elite/index.htm |
Seruph
|
Posted - 2009.11.24 03:14:00 -
[40]
I'm interested in helping with Drupal module development based on this library. I've read several posts discussing this but the main one was apparently locked 90 days ago. Is the Drupal integration still under development? If so, how can I help? If not, would I be able to get a hold of the existing code so I can test it out and expand on it?
|
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.11.24 18:50:00 -
[41]
Originally by: Anne Sapyx
Originally by: Lumy Here you can find some documentation.
404 Error û Page Not Found
Oh snap, Sourceforge removed docman. I'll have to redo whole documentation I guess.
Originally by: Seruph I'm interested in helping with Drupal module development based on this library. I've read several posts discussing this but the main one was apparently locked 90 days ago. Is the Drupal integration still under development? If so, how can I help? If not, would I be able to get a hold of the existing code so I can test it out and expand on it?
Dunno about Drupal integration. Definitely not by me. If you want help, you would be welcome. To integrate Ale in Drupal so it could use default Drupal DB connection, you'll need to make new cache plugin. Either implement AleInterfaceCache interface in new class, or try to extend AleCacheAbstractDB. Also, would it be possible to encapsulate whole library as Drupal extension, so people could install it?
Joomla! in EVE - IGB compatible CMS. |
Javen Corvinus
|
Posted - 2009.12.09 23:16:00 -
[42]
hi there,
i have Ale hooked into my CMS (content management system) and it's caching the data into mysql. However i am having issues accessing said data (mainly due to your docs not being online anymore except for the basic example on the eve dev wiki). I have a local copy of the phpdoc generated documents hooked up but am still unable to figure out exactly how to properly use ale. i have twisted the example code (this stuff here: http://wiki.eve-id.net/Eve-apiphp) into my CMS and can get it to work and display information while in the foreach loop using $character->name etc. However i would like to access this data outside the foreach loop, but my attempts have failed so far.
I thought it would be something like:
foreach ($account->result->characters as $character) { //this is how you can get attributes of element $characterID = (string) $character->characterID; //set characterID for CharacterSheet $ale->setCharacterID($characterID); if ($character->name == $myCharacter) { $characterSheet = $ale->char->CharacterSheet(); } }
$characterSheet->name; //do more stuff with Character Sheet here.
however i have found that $characterSheet contains no information....even without the if statement. This is what i tried to use to see what $characterSheet had in it:
foreach ($account->result->characters as $character) { //this is how you can get attributes of element $characterID = (string) $character->characterID; //set characterID for CharacterSheet $ale->setCharacterID($characterID); $characterSheet = $ale->char->CharacterSheet(); echo "Stuff->" . $characterSheet->name; echo "More Stuff->" . $characterSheet; }
Am i doing something wrong (or maybe missing the point)? I would really like to use your tool in my site, it looks like it has a pretty good set of features. Can somebody please point me in the right direction on how to properly use the Ale lib? I haven't been able to turn up much using google etc.
Thanks in advance
|
Javen Corvinus
|
Posted - 2009.12.10 20:27:00 -
[43]
hey i've since figure out my issues. If i had of taken the time to better read this thread, i would have had my answers. Sorry for my ignorance.
|
Anne Sapyx
Gallente Insurgent New Eden Tribe Systematic-Chaos
|
Posted - 2009.12.13 15:18:00 -
[44]
Why
Quote: try { $param = array('corporationID' => $this->corpId); $this->xmlCorp = $ale->corp->CorporationSheet($param); return TRUE; } catch (Exception $e) { $this->logSection('[Corps-Detail]', $e->getMessage()); return FALSE; }
returns me
Quote: Api call requires characterID
--------------------------------
Elite, is quite simply, the best game ever made. http://www.iancgbell.clara.net/elite/index.htm |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.12.14 13:59:00 -
[45]
Originally by: Anne Sapyx Why
Quote: try { $param = array('corporationID' => $this->corpId); $this->xmlCorp = $ale->corp->CorporationSheet($param); return TRUE; } catch (Exception $e) { $this->logSection('[Corps-Detail]', $e->getMessage()); return FALSE; }
returns me
Quote: Api call requires characterID
The library assumes 'corp' and 'char' calls require userID/API key/characterID. To override this you'll have add ALE_AUTH_NONE as 2nd parameter to disable check.
Quote:
$this->xmlCorp = $ale->corp->CorporationSheet($param, ALE_AUTH_NONE);
Joomla! in EVE - IGB compatible CMS. |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.12.15 21:57:00 -
[46]
Some news: 1st: 0.50.2 Release fixes several issue with database caches. 2nd: I'll be "moving" documentation to my site: http://code-box.sk/software/ale.html. Give me a little time, k?
Joomla! in EVE - IGB compatible CMS. |
Red Vengeance
|
Posted - 2009.12.23 03:30:00 -
[47]
Does anyone have a link to the documentation? The links to point to sourceforge all lead to a 404. Any help much appreciated!
|
DenShou
Gallente Wolves of Fenrir High Guard Council
|
Posted - 2009.12.23 04:49:00 -
[48]
@ Lumy
You had me scared there as i was looking over the documentation going 404, WTH 404, WTH DAMNIT !!!!
Then i finished this thread, unlike the person above me. oh well.
I am new to PHP & I will figure this out if i have to beat baby seals with my Tengu get it to work. ~ #### Faith can move mountains.... of Inventory - Rule #104 Ferengi Rules of Acquisition |
Lumy
Minmatar Sebiestor tribe
|
Posted - 2009.12.23 14:40:00 -
[49]
I've updated links at 1st page.
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2010.01.04 22:01:00 -
[50]
Hi. I have been working with "early" version, tried the 50.2 and it broke things (which I'll report on later when I have time to figure it out)...
However, I am trying to figure out how to get some additional output.
This is a snip of output: state:4 stateTimestamp:2010-01-04 18:48:39 onlineTimestamp:2009-12-04 04:47:45 typeID: 16275 Quantity: 16666 typeID: 16273 Quantity: 20932 typeID: 17889 Quantity: 61200 typeID: 16272 Quantity: 20993 typeID: 44 Quantity: 544 typeID: 9848 Quantity: 136 typeID: 3683 Quantity: 3400 typeID: 3689 Quantity: 680 typeID: 9832 Quantity: 1088 ========================AleParserXMLElement Object ( [name:private] => onCorporationWar [data:private] => SimpleXMLElement Object ( [@attributes] => Array ( [enabled] => 0 )
)
[children:private] => [rows:private] => )
onCorpWar: ======================================== from the code below: - excuse the mess, my guesses have failed.
How do I get the single value ->enabled ?
============ foreach ($charAssets->result->starbases as $assets) { echo "itemID:"; print($assets->itemID); echo "\n"; echo "typeID:"; print($assets->typeID); echo "\n"; echo "locationID:"; print($assets->locationID); echo "\n"; echo "moonID:"; print($assets->moonID); echo "\n"; echo "state:"; print($assets->state); echo "\n"; echo "stateTimestamp:"; print($assets->stateTimestamp); echo "\n"; echo "onlineTimestamp:"; print($assets->onlineTimestamp); echo "\n"; $params = array('itemID' => $assets->itemID); $POSdetails = $ale->corp->StarbaseDetail($params);
foreach ($POSdetails->result->fuel as $fuel) { printf("typeID:%7d Quantity:%7d\n", $fuel->typeID, $fuel->quantity); } echo "========================"; $x = $POSdetails->result->combatSettings->onCorporationWar; # echo "onCorpWar: $POSdetails->result->onCorporationWar \n"; print_r($x); # echo gettype($x); echo "\n"; echo "onCorpWar: $x->enabled \n"; echo "========================"; echo "\n"; } ========= Thx.
|
|
Lumy
Minmatar Sebiestor tribe
|
Posted - 2010.01.04 22:38:00 -
[51]
Originally by: Iyotaka Hi. I have been working with "early" version, tried the 50.2 and it broke things (which I'll report on later when I have time to figure it out)...
Damn it! :( File a bug report, please.
Originally by: Iyotaka
However, I am trying to figure out how to get some additional output.
onCorpWar: ======================================== from the code below: - excuse the mess, my guesses have failed.
How do I get the single value ->enabled ?
$x = $POSdetails->result->combatSettings->onCorporationWar; //you can use this $array = $x->toArray(); print_r($array); //or this $attribs = $x->attributes(); print_r($attribs);
Joomla! in EVE - IGB compatible CMS. |
Iyotaka
Iyotaka Union
|
Posted - 2010.01.05 07:06:00 -
[52]
thx. I'll work on the bug_report - via the link of course.
|
Miss Zulu
Cherry Games
|
Posted - 2010.01.08 14:21:00 -
[53]
How can i force the cachemode? The thing is during dev & test time i dont want to query the eve-online api everytime i hit F5. So i just want to query it once, grab all the data and then use the mysql stored cached xml. How to do that?
I'm doing something like:
require_once 'libs/ale/factory.php'; $ale = AleFactory::getEVEOnline(); $ale->setCredentials(...); $xml = $ale->char->WalletJournal(); var_dump($xml); |
Lumy
Minmatar eXceed Inc.
|
Posted - 2010.01.08 23:09:00 -
[54]
Originally by: Miss Zulu How can i force the cachemode? The thing is during dev & test time i dont want to query the eve-online api everytime i hit F5. So i just want to query it once, grab all the data and then use the mysql stored cached xml. How to do that?
I'm doing something like:
require_once 'libs/ale/factory.php'; $ale = AleFactory::getEVEOnline(); $ale->setCredentials(...); $xml = $ale->char->WalletJournal(); var_dump($xml);
Have look at eveonline.ini and fill the required parameters (see help).
[cache] class= "MySQL" host= "localhost" user= "<user name>" password= "<passowrd>" database= "<database name>" table= "<table name>" ;default "alecahce", look for definition in /ale/sql directory maxDataSize= null
If you don't want to create new DB connection, you can pass active connection through config array: $config = array('db' => $db); $ale = AleFactory::getEVEOnline($config);
Joomla! in EVE - IGB compatible CMS. |
Miss Zulu
Cherry Games
|
Posted - 2010.01.09 12:34:00 -
[55]
Originally by: Lumy
Have look at eveonline.ini and fill the required parameters...
the problem is that i get the Exhausted error if i reload the script to often during testing. the script should check if there is the exhausted error and then load all stuff from the DB (cache). how can i force that manually? i could just grab the xml string from the DB and the feed the xml parser with it but maybe there is a simplier solution or i'm just not seeing it? also the documentation is VERY limited.
|
Percivs
Mobile Oranging Brigade
|
Posted - 2010.01.17 07:28:00 -
[56]
Not sure if this is user error or a bug;
I'm writing a function to import data from the AssetList.xml;
Here's a sample raw XML;
<?xml version="1.0" encoding="UTF-8" ?> - <eveapi version="2"> <currentTime>2010-01-17 06:15:06</currentTime> - <result> - <rowset name="assets" key="itemID" columns="itemID,locationID,typeID,quantity,flag,singleton"> <row itemID="505111755" locationID="60006250" typeID="3297" quantity="1" flag="4" singleton="1" /> + <row itemID="545064116" locationID="60006250" typeID="596" quantity="1" flag="4" singleton="1"> - <rowset name="contents" key="itemID" columns="itemID,typeID,quantity,flag,singleton"> <row itemID="545064108" typeID="3651" quantity="1" flag="28" singleton="1" /> <row itemID="545064111" typeID="3634" quantity="1" flag="27" singleton="1" /> </rowset> </row> <row itemID="1440818755" locationID="60006250" typeID="11433" quantity="1" flag="4" singleton="0" /> <row itemID="1440819037" locationID="60006250" typeID="12179" quantity="1" flag="4" singleton="0" /> <row itemID="1440835011" locationID="60006250" typeID="11443" quantity="1" flag="4" singleton="0" /> <row itemID="1441282546" locationID="60006250" typeID="3356" quantity="1" flag="4" singleton="0" /> <row itemID="1441282703" locationID="60006250" typeID="25235" quantity="1" flag="4" singleton="0" /> <row itemID="1441282979" locationID="60006250" typeID="12386" quantity="1" flag="4" singleton="0" /> </rowset> </result> <cachedUntil>2010-01-18 05:15:06</cachedUntil> </eveapi>
I start by assigning the XML results to a variable within my object: try { $this->SetCredentials( $userID, $apiKey, $characterID ); $this->charAssetList = $this->ale->char->AssetList(); }
When I count($this->charAssetList->result->assets) I get a response of 1 and the only entry returned is the row with itemID="545064116" Which is not even the first row in the XML returned by the EVE API. Additionally, since that row is a container (it's a ship), I can successfully nest a foreach and pull the contents of the ship: foreach( $asset->contents as $contentItem ) returns the assets contained within the ship/container.
Was on RC2, upgraded to 0.50.2 to make sure that it wasn't a bug from an earlier release.
I'd spend more time troubleshooting my code, but since as I understand it, the result of count($this->charAssetList->result->assets) should be 8 not 1, I figured I'd start by asking if I'm a moron or if I need to file a bug report?
Thanks! --- "All of us who are concerned for peace and triumph of reason and justice must be keenly aware how small an influence reason and honest good will exert upon events in the political field" - A.E. |
Coryigon
Minmatar Repo Industries
|
Posted - 2010.01.23 14:56:00 -
[57]
Edited by: Coryigon on 23/01/2010 15:02:44
|
Percivs
Mobile Oranging Brigade
|
Posted - 2010.01.25 19:22:00 -
[58]
Originally by: Coryigon Edited by: Coryigon on 23/01/2010 15:12:50 Hey, I'm trying to use the EveCentral part of this, but with those examples I've still been unable to come up with anything. Any chance of a slightly more detailed example of its use.
I'd be happy to offer some examples, give me an idea of what you're looking for. I asked similar questions earlier in this thread and Lumy provided a clarification for my questions at the time:
http://www.eveonline.com/ingameboard.asp?a=topic&threadID=1042213&page=1#26 --- "All of us who are concerned for peace and triumph of reason and justice must be keenly aware how small an influence reason and honest good will exert upon events in the political field" - A.E. |
LAZst
|
Posted - 2010.01.27 15:23:00 -
[59]
Edited by: LAZst on 27/01/2010 15:24:15
Originally by: Percivs
I'd be happy to offer some examples, give me an idea of what you're looking for.
Hi, I would like to see an example of parsing the query - http://api.eve-central.com/api/marketstat?typeid=34&typeid=35®ionlimit=10000002
namely: setting parameters for TypeID and regionlimit Getting the: id = "34" -> buy -> min.
example above gives me an error: Fatal error: Call to protected method AleBase:: _retrieveXml () from context 'AleUtilContext' in xxxxx \ ale \ util \ context.php on line 60
if possible, a working example. I am not an expert in PHP, a beginner;) Thanks in advance
|
Two step
Amarr Aperture Harmonics K162
|
Posted - 2010.01.27 20:02:00 -
[60]
Here is some example code, from an app I am working on:
Quote:
require_once 'ale/factory.php';
$ale = AleFactory::getEVECentral(); $params = array('typeid'=>34, 'regionlimit'=>10000002); $priceInfo = $ale->marketstat($params);
$price = (float)$priceInfo->marketstat->type->buy->max;
|
|
Coryigon
Minmatar Repo Industries
|
Posted - 2010.01.27 21:23:00 -
[61]
Edited by: Coryigon on 27/01/2010 21:23:02 Ok, i've narrowed my problem down to the quicklook part of eve-central if i use MySQL cache class then I get the MySQL server has gone away message when i attempt to use the ale method of pulling this info. But when i changed cache class to file, it works as intended. Maybe lumy could figure out what is causing this.
|
Titus Balls
Minmatar Minmatar Ship Construction Services Ushra'Khan
|
Posted - 2010.01.28 11:28:00 -
[62]
Originally by: Coryigon Edited by: Coryigon on 27/01/2010 21:23:02 Ok, i've narrowed my problem down to the quicklook part of eve-central if i use MySQL cache class then I get the MySQL server has gone away message when i attempt to use the ale method of pulling this info. But when i changed cache class to file, it works as intended. Maybe lumy could figure out what is causing this.
Not related to this library, but a similar problem with the MySQL has gone away message - I increased the "max_allowed_packet" in the my.conf file and it fixed the issue.
|
Coryigon
Minmatar Repo Industries
|
Posted - 2010.01.28 20:18:00 -
[63]
Yeah, I tried that too, mind if I ask what value you used for it?
|
Percivs
Rule of Five
|
Posted - 2010.01.28 20:23:00 -
[64]
From the first page:
Quote: require_once 'ale/factory.php'; $ale = AleFactory::getEVECentral(); $params = array('typeid'=>array(34,35)); $xml = $ale->marketstat($params); $params = array('typeid'=>34); $xml = $ale->quicklook($params); $xml = $ale->evemon();
Originally by: LAZst Edited by: LAZst on 27/01/2010 15:24:15
Originally by: Percivs
I'd be happy to offer some examples, give me an idea of what you're looking for.
Hi, I would like to see an example of parsing the query - http://api.eve-central.com/api/marketstat?typeid=34&typeid=35«ionlimit=10000002
namely: setting parameters for TypeID and regionlimit Getting the: id = "34" -> buy -> min.
example above gives me an error: Fatal error: Call to protected method AleBase:: _retrieveXml () from context 'AleUtilContext' in xxxxx \ ale \ util \ context.php on line 60
if possible, a working example. I am not an expert in PHP, a beginner;) Thanks in advance
Per your request:
Quote: require_once 'ale/factory.php'; $ale = AleFactory::getEVECentral(); $params = array('typeid'=>array(34,35), 'regionlimit'=>10000002); $xml = $ale->marketstat($params); foreach( $xml->marketstat->children() as $type ) { $attrib = $type->attributes; $itemID = $attrib['id']; $volume= (float) (string) $type2->all->volume; $avg= (float) (string) $type2->all->avg; $max= (float) (string) $type2->all->max; $min= (float) (string) $type2->all->min; $stddev= (float) (string) $type2->all->stddev; $median= (float) (string) $type2->all->median; }
--- "All of us who are concerned for peace and triumph of reason and justice must be keenly aware how small an influence reason and honest good will exert upon events in the political field" - A.E. |
Von Orca
|
Posted - 2010.02.18 15:40:00 -
[65]
Could anyone provide an example on how to walk through the wallet journal?
|
Lumy
Minmatar eXceed Inc.
|
Posted - 2010.02.20 18:36:00 -
[66]
Originally by: Von Orca Could anyone provide an example on how to walk through the wallet journal?
This should help: http://code-box.sk/software/ale/documentation/14-calls-with-pagination-example.html
Joomla! in EVE - IGB compatible CMS. |
Signe Tesk
|
Posted - 2010.02.23 11:12:00 -
[67]
Tip of the hat from me; this lib has been very good to me.
|
Labrador Retriever
|
Posted - 2010.02.23 23:02:00 -
[68]
Great Job, Thanks alot for this. A quick question is there any way to grab a range of transactions from the wallet transactions? or just the ones that are new since the last non-cache hit? the 1000 seems to overwhelm my php script and browser.
|
Lumy
Minmatar eXceed Inc. Tread Alliance
|
Posted - 2010.02.24 01:14:00 -
[69]
New release is here! 0.50.3 Fixed couple of issues from tracker. Also fixed problem with EVE Central LAZst metioned. Sorry it took so long.
Joomla! in EVE - IGB compatible CMS. |
Packtu'sa
Nabaal Construction and Industrials Corp Nabaal Syndicate
|
Posted - 2010.03.08 05:59:00 -
[70]
I wrote this code a while back. Any chance of it getting implemented?
I definitely enjoy ALE, though I haven't done much beyond little tests with it yet. I'm adapting it into a CodeIgniter library SoonÖ for one of my projects, so we'll see how it fares with Active Record.
Keep up the good work!
Packtu'sa Founder/CEO, Nabaal Construction and Industrials Corp [NCIC] |
|
Anna Logic
|
Posted - 2010.03.25 08:49:00 -
[71]
Hi,
I've some problem to extract data from the file MemberSecurity.
Exemple of file :
<?xml version='1.0' encoding='UTF-8'?> <eveapi version="2"> <currentTime>2010-03-25 07:51:42</currentTime> <result> <member characterID="105792641" name="Biline Aegis"> <rowset name="roles" key="roleID" columns="roleID,roleName" /> <rowset name="grantableRoles" key="roleID" columns="roleID,roleName" /> <rowset name="rolesAtHQ" key="roleID" columns="roleID,roleName" /> <rowset name="grantableRolesAtHQ" key="roleID" columns="roleID,roleName" /> <rowset name="rolesAtBase" key="roleID" columns="roleID,roleName" /> <row roleID="8192" roleName="roleHangarCanTake1" /> <row roleID="16384" roleName="roleHangarCanTake2" /> <row roleID="32768" roleName="roleHangarCanTake3" /> <row roleID="65536" roleName="roleHangarCanTake4" /> <row roleID="131072" roleName="roleHangarCanTake5" /> <row roleID="262144" roleName="roleHangarCanTake6" /> <row roleID="524288" roleName="roleHangarCanTake7" /> <row roleID="4398046511104" roleName="roleContainerCanTake1" /> <row roleID="8796093022208" roleName="roleContainerCanTake2" /> <rowset name="grantableRolesAtBase" key="roleID" columns="roleID,roleName" /> <rowset name="rolesAtOther" key="roleID" columns="roleID,roleName" /> <rowset name="grantableRolesAtOther" key="roleID" columns="roleID,roleName" /> <rowset name="titles" key="titleID" columns="titleID,titleName"> <row titleID="256" titleName="VETERAN" /> </rowset> </member> ...
How to extract data from the rowset member without toArray() ? I've try to make this but it don't work :
//###################################### $array = $ale->corp->MemberSecurity($params);
foreach ($array->result->member as $members){ $characterID=$members->characterID; $name=$members->name;
foreach ($members->roles as $roles){ $roleID=$roles->roleID; } } //######################################
|
Lumy
Minmatar eXceed Inc.
|
Posted - 2010.03.25 09:10:00 -
[72]
Edited by: Lumy on 25/03/2010 09:15:53
Originally by: Anna Logic
//###################################### $array = $ale->corp->MemberSecurity($params);
foreach ($array->result->member as $members){ $characterID=$members->characterID; $name=$members->name;
foreach ($members->roles as $roles){ $roleID=$roles->roleID; } } //######################################
Don't iterate through <member> node. Parser recognizes it as s single node, not a rowset. So you'll have to use children() method to fetch all kids.
$array = $ale->corp->MemberSecurity($params); foreach ($array->result->children() as $members){ $characterID = $members->characterID; //I don't remember if this actually works, maybe you'll have to use $members->attributes(); $name = $members->name;
foreach ($members->roles as $roles){ $roleID=$roles->roleID; } }
Joomla! in EVE - IGB compatible CMS. |
Dusty Meg
|
Posted - 2010.03.25 13:41:00 -
[73]
What im trying to do is get eve-central prices into a mysql database. Ive had alook around and it seems ALE does what I need but what im asking for is some help with this. The samples above dont seem to input it into a database. It will also need to do this say twice a day. I take it I would need to use a cronjob but some help would be good.
|
Tor Azgard
|
Posted - 2010.03.30 07:58:00 -
[74]
Edited by: Tor Azgard on 30/03/2010 07:58:59 Maybe I should try to post in the right forum the next time.
|
|
|
|
Pages: 1 2 3 :: [one page] |