open All Channels
seplocked EVE Technology Lab
blankseplocked New ALE release (PHP API Library for EVE)
 
This thread is older than 90 days and has been locked due to inactivity.


 
Pages: 1 2 [3]

Author Topic

Coryigon
Minmatar
Mom 'n' Pop Ammo Shoppe
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
Balls Independent Traders
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
Mom 'n' Pop Ammo Shoppe
Posted - 2010.01.28 20:18:00 - [63]
 

Yeah, I tried that too, mind if I ask what value you used for it?

Percivs
Sebiestor Tribe
Posted - 2010.01.28 20:23:00 - [64]
 

Edited by: Percivs on 01/02/2010 15:19:20
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) $type->all->volume;
$avg = (float) (string) $type->all->avg;
$max = (float) (string) $type->all->max;
$min = (float) (string) $type->all->min;
$stddev = (float) (string) $type->all->stddev;
$median = (float) (string) $type->all->median;
}




Edit: code fixes (typo corrections)

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
Sebiestor Tribe
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


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]
 

Edited by: Labrador Retriever on 23/02/2010 23:30:51
Great Job, Thanks alot for this.

Lumy
Minmatar
Sebiestor Tribe
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.

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? Wink

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!

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
Sebiestor Tribe
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;
}
}

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]

This thread is older than 90 days and has been locked due to inactivity.


 


The new forums are live

Please adjust your bookmarks to https://forums.eveonline.com

These forums are archived and read-only