Pages: 1 [2] 3 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
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;
|
|
|
|
|
Pages: 1 [2] 3 :: one page |
First page | Previous page | Next page | Last page |