These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Yapeal PHP API library (2.0)

Author
Tiberius Zol
Moira.
#81 - 2014-08-15 15:24:00 UTC  |  Edited by: Tiberius Zol
Found another Problem with WalletTransactions:

[2014-08-15 16:52:50] yapeal.WARNING: Failed to upsert data from Eve API char/WalletTransactions for 93116526 on account 1000 {"exception":"[object] (PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'typeName' at row 72 at /htdocs/eve/yapealneu/lib/Database/EveApiToolsTrait.php:107)"} []

typeName in the old yapeal: varchar(255)
typeName in the new yapeal: char(50)

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Dragonaire
Here there be Dragons
#82 - 2014-08-15 20:35:26 UTC
Based on my post from yesterday I decided to start putting together a little guide to help people when trying to troubleshoot Yapeal. I don't know how useful it might be for people so ideas and feedback on how to improve it are welcome. Also like to hear ideas for how to continue on or does it need to continue? Anyway here the link:
https://github.com/Dragonrun1/yapeal/wiki/Troubleshooting-Tips

Tiberius Zol - Thanks for report on WalletTransactions problem I started issue for it.
https://github.com/Dragonrun1/yapeal/issues/33

I'm still looking at the other thing with Starbase but let's try one thing that might help on getting a little more complete log message for all you POSes. It looks as though corpStarbaseList for ownerID = 98067338 wasn't expired at the time you took that log so let's 'force' all the Starbase stuff to need refreshing at the same time. This may work better for you if you temporarily stop any crontabs etc and run Yapeal manually.

  • Go into the utilCachedUntil table and delete all the StarbaseList and StarbaseDetails rows.
  • You can also optional delete the cache files for them in cache/corp/ but Yapeal should use or replace them as needed.
  • You might also find truncating the log/yapeal.log file useful.
  • Now run Yapeal manually on CLI with something like 'php bin\yapeal.php'.

Once it finishes take a look once again at the tables that didn't seem to be updating and see if they changed also look at your log and see if it now shows anything different like trying to add the other POS that is missing. If you can Pastebin the section from the new log so I can compare it with to old one that would be great as well.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tiberius Zol
Moira.
#83 - 2014-08-15 22:14:24 UTC
Ok what i made now:
- renamed log/yapeal.log (for creating an empty one)
- deleted all Starbase stuff from utilCachedUntil
- deleted all Starbase stuff in cache/corp/
- run Yapeal manually

after it.. no change (one error in the logfile cause yapeal didn't find the deleted xml)

if have paste the starbase stuff from the new yapeal.log
i also runned https://api.eveonline.com/corp/StarbaseDetail.xml.aspx with the same keyID/vCode for the active pos and pasted it
and i pasted my data from starbaselist

all in one pastebin here: http://pastebin.com/Dp0KbZ6t

as a sidenote.. there is only one starbaseDetail xml file in cache/corp (with the offline pos with little fuel left)

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Dragonaire
Here there be Dragons
#84 - 2014-08-19 20:23:47 UTC
Tiberius Zol - I've been looking at stuff for last couple days and just not seeing anything but I just pushed an update that will add into the XML via processing instruction a json copy of the arguments used when retrieving it from the API server which might help one of us figure out why you're have problems. I did setup a new test POS myself and everything seems to be working fine with the APIs. Try the update and clear the cachedUntil table and the FS cache and see if the XML with the new info makes a difference because without something more to work with not sure what I can do to help you Sad

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tiberius Zol
Moira.
#85 - 2014-08-19 20:48:04 UTC
did you try more than one pos? maybe there is a problem that its not loop over all poses? but i will try the update now.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Tiberius Zol
Moira.
#86 - 2014-08-19 21:01:41 UTC  |  Edited by: Tiberius Zol
OK..deleted all entries in StarbaseList, StarbaseDetail and Fuel, deleted starbase entries in cachedUntil and Cache also.
runned yapeal manually..
- all entrys in starbaseList seem to be ok
- theres only one entry in starbaseDetail (should be one for each pos i think?)
- posFuel have only entry for this entry...

as a sidenote.. this pos entry is for the first entry in starbaseList. seems really a loop problem?!
as my interpretation yapeal read the first entry in starbase list.. this work as it should be.. but after it, it doesn't go to the next entry in starbaseList.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Dragonaire
Here there be Dragons
#87 - 2014-08-19 23:46:34 UTC
Tiberius Zol - You are correct it is a loop problem more that it's missing a loop. Person that worked on API hadn't done any of the more complex ones before and I missed it during QA also. We only had single POS to test with so it seemed to work. Now that I know where the problem is should have it fixed in a day or two at most.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Dragonaire
Here there be Dragons
#88 - 2014-08-20 01:40:39 UTC
Tiberius Zol - Give the update to DatabaseDetails a try and see if it fixes your issue.
https://github.com/Dragonrun1/yapeal/issues/35

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Tiberius Zol
Moira.
#89 - 2014-08-20 07:11:03 UTC  |  Edited by: Tiberius Zol
Absolutly great.
Seem to be ok now.
Thanks for working on this. :)

Now i need only the assetstuff (and the blueprintstuff after the hyperionrelease). After it i change fully to the yapeal2. (workin with a mixture of both, yapeal1 +2 now.)

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

SCORPl0
Foundation Cutting-Edge
#90 - 2014-08-20 12:39:43 UTC  |  Edited by: SCORPl0
Hello,

following steps to install and start to use yapeal but it looks like the wiki is obsolete and concern old yapeal version.

I am in the step where testing yapeal ... but ... no yeapeal.php in install base dir ...

So now what to test and start please ?

ps: installed from git repo
Tiberius Zol
Moira.
#91 - 2014-08-20 14:51:47 UTC
forget the wiki.. look into the install.md and after it in the config.md... the yapeal.php is in the bin directory

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

SCORPl0
Foundation Cutting-Edge
#92 - 2014-08-20 18:35:26 UTC
Tiberius Zol wrote:
forget the wiki.. look into the install.md and after it in the config.md... the yapeal.php is in the bin directory


All this two files completed already. Install and config done, database populated.

I just need a start point on how uses api functions and how I can play with it.

There's nothing that introduce the use of the api if the wiki became for old versions.

I'm not a php dev at the origin, but a developer anyway.

Thanks for any information.
Tiberius Zol
Moira.
#93 - 2014-08-20 19:43:04 UTC
ah ok.. if you have the DB stuff ready, you should fill the API data directly to the DB (prefix_utilRegisteredKey) and don't forget the right API mask (it doesn't work without it here).

after it just run the bin/yapeal.php from commandline...
tadaaa.. you should see several data for the api in your tables..
then just let it be run every minute via your crontab.. that should be all.. after it you can use all your data in the database for whatever you need it.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

SCORPl0
Foundation Cutting-Edge
#94 - 2014-08-20 20:55:54 UTC  |  Edited by: SCORPl0
Tiberius Zol wrote:
ah ok.. if you have the DB stuff ready, you should fill the API data directly to the DB (prefix_utilRegisteredKey) and don't forget the right API mask (it doesn't work without it here).

after it just run the bin/yapeal.php from commandline...
tadaaa.. you should see several data for the api in your tables..
then just let it be run every minute via your crontab.. that should be all.. after it you can use all your data in the database for whatever you need it.


I'll try this.

The data imported depends of the api access masks selected on EvE Create Api Page ?

Thanks for help.
Tiberius Zol
Moira.
#95 - 2014-08-20 21:00:35 UTC  |  Edited by: Tiberius Zol
yes.. and which of the apis are implemented in yapeal yet (some apis missing and will be added later, like assets)

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

SCORPl0
Foundation Cutting-Edge
#96 - 2014-08-20 21:10:24 UTC
SCORPl0 wrote:
Tiberius Zol wrote:
ah ok.. if you have the DB stuff ready, you should fill the API data directly to the DB (prefix_utilRegisteredKey) and don't forget the right API mask (it doesn't work without it here).

after it just run the bin/yapeal.php from commandline...
tadaaa.. you should see several data for the api in your tables..
then just let it be run every minute via your crontab.. that should be all.. after it you can use all your data in the database for whatever you need it.


I'll try this.

The data imported depends of the api access masks selected on EvE Create Api Page ?

Thanks for help.


Looks like yes, some corp data inserted using yapeal.php.

Now it's all about php code to build my function using database data.

Thanks again !
SCORPl0
Foundation Cutting-Edge
#97 - 2014-08-20 21:13:30 UTC
Tiberius Zol wrote:
yes.. and which of the apis are implemented in yapeal yet (some apis missing and will be added later, like assets)


I just need CorpWalletJournal to track user donations and display it on a php sorted page.
Tiberius Zol
Moira.
#98 - 2014-08-20 21:18:59 UTC
shouldn't be that hard.. fetch all from the table where refTypeID=10 (should be player donation)

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Dragonaire
Here there be Dragons
#99 - 2014-08-20 22:31:53 UTC
Just thought I say I've updated the crontab Setup page in the wiki if you need some more help with that.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Dragonaire
Here there be Dragons
#100 - 2014-08-25 18:36:10 UTC
Hi all I just pushed something I've been working on for last couple weeks. I finished up the database updater system. You can try it out by running

'php bin\yc D:U'

It should be able to update any databases that have been manually updated to at least have the blueprint API tables. Note just like with install you may need additional privileges above what the normal Yapeal user needs. Something that's different with the update compared to the install is it uses MYSQL procedure so make sure the user you run it as can create, delete, and use them. Also as always make sure you have a current backup of your database before using it.

Just a little bit about how the updates work. The command starts out by grabbing your settings from config/yapeal.yaml. You can tell it to use a different config file you if you want or override any of the settings using command line options. The command then checks the current version of the database in the utilDatabaseVersion table if it exists and compares that to the sql files in bin/sql/updates/ directory. It will apply any of the sql files that have a version (name) greater then the current database version. They are applied in order and the utilDatabaseVersion table is updated. On the first run you will get a warning message about 'Could NOT get database version ...' which you can ignore as the table should be added for you automatically so you don't see the message again. I decided to use a date-timestamp for the versions vs something else like plain numbers which you might have seen during development. All but the first one are based on when I did commits to git with database updates but in the future they'll be based on when I do create the update sql on my development machine since I wouldn't have commit dates before doing the actual commits like I did this time.

Anyway hope this new tool makes it easier for everybody when updating Yapeal. As always you can ask any questions you have here and if you find a bug make sure to create the issue on GitHub.

Thank you for using Yapeal.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.