Pages: 1 2 [3] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Snipes2083
|
Posted - 2011.07.10 22:34:00 -
[61]
Edited by: Snipes2083 on 10/07/2011 22:53:09 Edited by: Snipes2083 on 10/07/2011 22:50:49 Hey all, I am sorry for bumping a thread that has not had a post in it for a while bit it appears that this is the only place where general questions about the API are being addressed.
I may be misunderstanding how to go about using this API but after looking at the apiCheck demonstrations and reading the brief documentation that is given on the API this is the code that I have come up with.
Quote: include "pheal/Pheal.php"; spl_autoload_register("Pheal::classload"); PhealConfig::getInstance()->cache = new PhealFileCache(".pheal/cache/"); $pheal = new Pheal($userID, $APIKey, $charID, "corp"); $sheet = $pheal->CorporationSheet();
What I think this should do is load the CorporationSheet into $sheet in which I can access an array of information. Instead i get a page full of parse errors due to the API grabbing an unexpected page.
Thank you in advance for any assistance that you may be able to provide.
o7
|
Snipes2083
|
Posted - 2011.07.11 02:45:00 -
[62]
In response to my own post, I figured out what it was that was holding me back and figured I would post the solution to help others.
Quote: include "pheal/Pheal.php"; spl_autoload_register("Pheal::classload"); PhealConfig::getInstance()->cache = new PhealFileCache(".pheal/cache/"); $pheal = new Pheal($userID, $APIKey, "corp"); $sheet = $pheal->CorporationSheet(array(characterID=>$charID));
It took me a little while figure out how the $charID variable had to be passed.
|
Peter Powers
FinFleet Raiden.
|
Posted - 2011.07.11 23:19:00 -
[63]
Originally by: Snipes2083
Quote: $sheet = $pheal->CorporationSheet(array(characterID=>$charID));
you really should put the key into quotes so it reads: $pheal->CorporationSheet(array('characterID' =>$charID));
otherwise you will get warnings on a proper setup :) wearing expensive clothes since 2011.06.24 22:03:00
|
Snipes2083
|
Posted - 2011.07.12 10:11:00 -
[64]
Ok good to know. Thanks for the tip. BTW, Thanks for the work you have put into this. I know how hard it is as I have pretty much wrote one for the bliz armory. It is a lot of work and I thank you for not only doing it but doing it well.
|
Snipes2083
|
Posted - 2011.07.12 16:11:00 -
[65]
General Question: How do you pass a parameter to the API?
More Specific Question: If you are to walk the entries in the journal, how do you pass the $beforeRefID value? I have found no reference in the documentation as to how to address this situation and although I can work with PHP I am not good enough to really understand what is going on with the objects. Below is my failed attempt to pass this information. It did not work .. $beforeRefID ='1234567890' $corpSheet = $corpPheal->CorporationSheet(array('characterID'=>$fullCharID), $beforeRefID);
Again thank you all in advance for any help you can offer.
|
Snipes2083
|
Posted - 2011.07.12 16:22:00 -
[66]
OK once again I answered my own question. If only I would come up with the answer before posting the question I could save some thread space. Oh well, perhaps somebody can benefit from it.
The parameters all get passed in the array like below.
Quote: $fullCharID = "your full API key"; $refID ='1234567890'; $charJournal = $corpPheal->WalletJournal(array('characterID'=>$fullCharID,'beforeRefID'=>$refID));
o7
|
Captain Xero
Gallente 3 Star Industries
|
Posted - 2011.08.31 21:44:00 -
[67]
I'm having a little trouble walking over the returned asset list.
$pheal = new Pheal($accountID, $full_api_key, "corp"); $result = $pheal->AssetList(array("characterID" => $charID));
foreach($result->assets as $row) { echo $row->itemID; }
When there are nested assets (things in containers etc) this loop seems to go over everything twice. Does anyone have any pointers on this?
Apart from this I've managed to completely replace the code I'd written with PHEAL, it works great - thanks.
|
Peter Powers
FinFleet Raiden.
|
Posted - 2011.08.31 22:31:00 -
[68]
can you please create a new issue at github, and add an example of the xml causing this? (for example from your cache directory) wearing expensive clothes since 2011.06.24 22:03:00
|
Captain Xero
Gallente 3 Star Industries
|
Posted - 2011.09.01 11:23:00 -
[69]
Yeah no problem, I've created an issue. I was trying to narrow the problem down a bit, but it has me stumped. It seems to be to do with the size of the file, so it will be interesting to see if you can replicate the issue or if it's something wrong with my environment.
|
|
|
|
Pages: 1 2 [3] :: one page |
First page | Previous page | Next page | Last page |