| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Wafflehead
|
Posted - 2010.10.14 23:19:00 -
[1]
$WalletJournal = $ale->char->WalletJournal($parms); foreach ($WalletJournal->result->entries as $lineItem) { $trans_date = $lineItem->date; $pilotName = $lineItem->ownerName1; $ammount = $lineItem->amount; $reason = $lineItem->reason; }
How do i limit it by beforeRefID ?.
Anyone know any documentation on ALE / Samples etc? Hard to understand with no help etc
|

Lutz Major
Austriae Est Imperare Orbi Universo
|
Posted - 2010.10.15 05:51:00 -
[2]
You cannot limit your journal entries by using the 'beforeRefID'.
This parameter is only used for 'walking the journal'. This means if, you have more than 1000 entries in one week you can issue another request stating the lowest refID as parameter value. Then you will receive the rest of your entries (or have to do another request).
See also: http://wiki.eve-id.net/APIv2_Char_JournalEntries_XML
|

Lerado Mendar
Apex Tech Systematic-Chaos
|
Posted - 2010.10.15 09:20:00 -
[3]
Here you go: ALE Documentation
The topic you'd most likely want to read first is "Example of calls with pagination". It uses killmails as an example, but re-writing it for the Wallet Journal should be pretty easy. ---
|

Wafflehead
|
Posted - 2010.10.15 11:34:00 -
[4]
Thanks for the replies.
Would i be right in thinking..
$wCount = count($xml->result->entries); if ($wCount > 1000) { break; } $xpathStr = '/eveapi/result/rowset/row[last()]/@refID'; $beforeID = (string) reset($xml->xpath($xpathStr)); $params['beforeRefID'] = $beforeID;
|

Lerado Mendar
Apex Tech Systematic-Chaos
|
Posted - 2010.10.15 11:43:00 -
[5]
Originally by: Wafflehead Thanks for the replies.
Would i be right in thinking..
(...) if ($wCount > 1000) { break; } (...)
Uh, the "> 1000" irritates me. The maximum number of rows for one call is 1000, less if more than one week of data has already been sent. It should be "< 1000" in my opinion. ---
|

Wafflehead
|
Posted - 2010.10.15 11:52:00 -
[6]
Whoaps.
$wCount = count($xml->result->entries); if ($wCount < 1000) { break; } $xpathStr = '/eveapi/result/rowset/row[last()]/@refID'; $beforeID = (string) reset($xml->xpath($xpathStr)); $params['beforeRefID'] = $beforeID;
$beforeID = (string) reset($xml->xpath($xpathStr));
This throws an error for me. Any ideas?
|

Lerado Mendar
Apex Tech Systematic-Chaos
|
Posted - 2010.10.15 12:02:00 -
[7]
What kind of error do you get?
If the $xpath approach does not work, you can try to convert the result to an array and then jump to the last element of that array.
$wCount = count($xml->result->entries); if ($wCount < 1000) { break; } $xmlArray = $xml->result->entries->toArray(); $lastEntry = end(xmlArray); $beforeID = $lastEntry['refID']; $params['beforeRefID'] = $beforeID;
Sadly, I have no way of testing the code myself at the moment, but it looks like it should work ;) ---
|

Wafflehead
|
Posted - 2010.10.15 12:10:00 -
[8]
Edited by: Wafflehead on 15/10/2010 12:12:16 Only variables can be passed by reference
$lastEntry = end(xmlArray);
Thanks for help really appreciated!
/Edit
$lastEntry = end($xmlArray); :D Testing
|

Nobodys Daughter
|
Posted - 2010.12.21 15:54:00 -
[9]
hello . how can i extract a single value from:
object(SimpleXMLElement)#77 (4) { ["@attributes"]=> array(1) { ["version"]=> string(1) "2" } ["currentTime"]=> string(19) "2010-12-21 15:50:14" ["result"]=> object(SimpleXMLElement)#70 (1) { ["rowset"]=> object(SimpleXMLElement)#74 (2) { ["@attributes"]=> array(3) { ["name"]=> string(8) "accounts" ["key"]=> string(9) "accountID" ["columns"]=> string(28) "accountID,accountKey,balance" } ["row"]=> array(7) { [0]=> object(SimpleXMLElement)#79 (1) { ["@attributes"]=> array(3) { ["accountID"]=>
For example row 0 accountid ?
$xmlobject->result->rowset ist empty
$xmlobject->result has data
|

Darkrurik
Caldari Lupi di Wotan Indomita Classis
|
Posted - 2011.01.04 16:47:00 -
[10]
Hi I have a problem I created a php Aplications my corp that shows through the wings and the journal container logs and translation. Both the journal that translation work perfectly xi containerlog but it does not work you place the code can you help me thanks
try { $ale = AleFactory::getEVEOnline(); $ale->setCredentials($userID, $apiKey, $characterID,$corpID); // $CorpcontainerLog = $ale->corp->containerLog($corpID); // foreach ($CorpcontainerLog->result->containerLog as $transaction_containerLog){ // $logTime[] = $transaction_containerLog->logTime; $itemID[] = $transaction_containerLog->itemID; $itemTypeID[] = $transaction_containerLog->itemTypeID; $actorID[] = $transaction_containerLog->actorID; $actorName[] = $transaction_containerLog->actorName; $flag[] = $transaction_containerLog->flag; $locationID[] = $transaction_containerLog->locationID; $action[] = $transaction_containerLog->action; $passwordType[] = $transaction_containerLog->passwordType; $typeID[] = $transaction_containerLog->typeID; $quantity[] = $transaction_containerLog->quantity; $oldConfiguration[] = $transaction_containerLog->oldConfiguration; $newConfiguration[] = $transaction_containerLog->newConfiguration; // } // foreach ($logTime as $key => $logTimes) { // //sql code mysql_insert_ContainerLog($logTime[$key],$itemID[$key],$itemTypeID[$key],$actorID[$key],$actorName[$key],$flag[$key],$locationID[$key],$action[$key],$passwordType[$key],$typeID[$key],$quantity[$key],$oldConfiguration[$key],$newConfiguration[$key]); // } // } catch (Exception $e) { echo $e->getMessage(); } //
Ps: could be a large amount of data and if so how do I fix
|

carmo pereira
the muppets Blade.
|
Posted - 2011.01.05 13:45:00 -
[11]
you maybe have to use '' when you use names and dates. try for yourself.
here's an example:
mysql_query("INSERT INTO tablename (ID, date, type, name, ammount) VALUES ($ID, '$date', $Type,'$Name',$ammount)");
carmo
----
Half the money I spend on advertising is wasted, and the problem is I do not know which half Lord Leverhulme 1851-1925, British founder of Unilever and philanthropist |
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |