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
Noban Hashur
Apotheosis.
#301 - 2016-08-23 23:30:49 UTC
Firstly, thanks for an amazing library Dragonaire - I've only just started looking in to it but it seems awesome!

I tried installing Yapeal via composer yesterday and I kept getting XSL (or maybe XSD, I can't remember) errors when trying to run AutoMagic. I eventually noticed that composer pulled down an old version and I'm guessing the Eve API was updated since then. I'm not too familiar on how composer works etc but I thought I'd let you know just in case it's something you need to fix on your end.

Also, when I run AutoMagic, it pulls the data from the API but in the console I'm getting these messages come up (seems to be one for each API call/DB query made):

[1471994296.219] yapeal.DEBUG: SELECT "expires" FROM "test"."utilCachedUntil" WHERE {WHERE};  
[1471994296.219] yapeal.WARNING: Could NOT get cache expired for Eve API eve/ConquerableStationList {"exception":"[object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE}' at line 1 at /home/vagrant/test/yapeal-ng/lib/EveApi/CommonEveApiTrait.php:161)\n[stacktrace]\n#0 /home/vagrant/test/yapeal-ng/lib/EveApi/CommonEveApiTrait.php(161): PDO->query('SELECT \"expires...')\n#1 /home/vagrant/test/yapeal-ng/lib/EveApi/CommonEveApiTrait.php(122): Yapeal\\EveApi\\Eve\\EveSection->cachedUntilIsNotExpired(Object(Yapeal\\Xml\\EveApiXmlData))\n#2 /home/vagrant/test/yapeal-ng/vendor/dragonrun1/event-mediator/src/Mediator.php(204): Yapeal\\EveApi\\Eve\\EveSection->startEveApi(Object(Yapeal\\Event\\EveApiEvent), 'Yapeal.EveApi.E...', Object(Yapeal\\Event\\Mediator))\n#3 /home/vagrant/test/yapeal-ng/lib/Event/Mediator.php(127): EventMediator\\Mediator->trigger('Yapeal.EveApi.E...', Object(Yapeal\\Event\\EveApiEvent))\n#4 /home/vagrant/test/yapeal-ng/lib/Event/EveApiEventEmitterTrait.php(78): Yapeal\\Event\\Mediator->triggerEveApiEvent('Yapeal.EveApi.E...', Object(Yapeal\\Xml\\EveApiXmlData))\n#5 /home/vagrant/test/yapeal-ng/lib/Yapeal.php(113): Yapeal\\Yapeal->emitEvents(Object(Yapeal\\Xml\\EveApiXmlData), 'start')\n#6 /home/vagrant/test/yapeal-ng/lib/Cli/Yapeal/YapealAutoMagic.php(128): Yapeal\\Yapeal->autoMagic()\n#7 /home/vagrant/test/yapeal-ng/vendor/symfony/console/Command/Command.php(259): Yapeal\\Cli\\Yapeal\\YapealAutoMagic->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#8 /home/vagrant/test/yapeal-ng/vendor/symfony/console/Application.php(847): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#9 /home/vagrant/test/yapeal-ng/vendor/symfony/console/Application.php(192): Symfony\\Component\\Console\\Application->doRunCommand(Object(Yapeal\\Cli\\Yapeal\\YapealAutoMagic), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#10 /home/vagrant/test/yapeal-ng/vendor/symfony/console/Application.php(123): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#11 /home/vagrant/test/yapeal-ng/bin/yc(74): Symfony\\Component\\Console\\Application->run()\n#12 {main}"}


Is this normal or is something going wrong? I'm using MariaDB but AFAIK that shouldn't cause any issues.

Finally, I entered my API key which has two characters on it. From looking at utilCachedUntil, it looks like for one of my characters it's pulled 18 API queries, but for the other it's only done 17. Upon further inspection, the missing one is charCharacterSheet. Should the app be pulling a character sheet for both of my characters?
Dragonaire
Here there be Dragons
#302 - 2016-08-24 18:36:00 UTC  |  Edited by: Dragonaire
You got one of my untested WIP pushes I'm in the process of pushing out some more stuff and fixes now. Just pushed 28 commit sure I fixed something in there and broke something new for you Blink

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

Noban Hashur
Apotheosis.
#303 - 2016-08-25 23:49:18 UTC  |  Edited by: Noban Hashur
Hehe awesome, you certainly fixed the initial errors, but I'm still only getting one character pulled in to the charCharacterSheet table. Checking utilCachedUntil shows 16 entries for the first character which has an entry in charCharacterSheet, and 15 entries for the second which doesn't have one.

I ran AutoMagic with -v, here is the relevant output regarding the character sheet. I've replaced my keyID and characterID with placeholders. Interesting that only character 2222 (the one that is not showing up in the charCharacterSheet table) is the only one that was logged, my other character had no log entries in relation to charCharacterSheet.

http://pastebin.com/NTh8grQx

I'm using a fresh install from composer as of 30 minutes ago with a new database. The only change I have made was putting my database info in to the config file, setting the 'active' column for all existing keys in utilRegisteredKey to 0 and adding my own key. Both characters are on the one account.
Dragonaire
Here there be Dragons
#304 - 2016-08-29 17:43:13 UTC
Sorry been busy with other things so didn't get chance to check forums.
[20160826 093947.768] yapeal.NOTICE: Element 'ancestry': This element is not expected. Expected is ( allianceID ).
That's the line pointing to the problem I'll have to take a look at the XSD file and see what's going on probably didn't have AllianceID be optional I'm guessing.

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
#305 - 2016-08-29 18:00:55 UTC
https://github.com/Yapeal/yapeal-ng/issues/5
This should fix it for you.

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
#306 - 2016-11-03 21:50:58 UTC
Ping just to let everyone know I'm still alive and hopefully some side projects are getting wrapped up so I can spend more time on Yapeal again.

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