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 (version 1.0.5)

First post
Author
EcicIdol
#21 - 2011-09-16 07:07:15 UTC
Drapko Nitzhonot wrote:
EcicIdol wrote:
So what tables should I enter data into for corp API? Could you take a screenshot of the places to enter in data to pull corp info? Just some dummy info in a screenshot would be great. Thanks.


utilRegisteredCorporation


utilRegisteredKey

  • activeAPIMask: same as before
  • isActive: 1
  • keyID: it's the ID of your API key
  • proxy: if you don't know, don't touch it
  • vCode: it's the vCode of your API key


utilSections

  • corp row: change isActive to 1



Thank you very much. Now I am getting this.


[/home/yapeal]# php -f /home/yapeal/yapeal.php
[2011-09-16 07:05:33.314]
NOTICE: Undefined variable: mask
File: /home/yapeal/class/SectionCorp.php(292)
[2011-09-16 07:05:36.206]
WARNING: Row was missing required fields (rawQuantity) that are needed for corpAssetList
File: /home/yapeal/class/YapealQueryBuilder.php(182)


I get that WARNING message several hundred times.
Dragonaire
Here there be Dragons
#22 - 2011-09-16 15:29:22 UTC
Actually the Notice error you are getting might be part of the problem you're having as it's a bug that seem to have crape in with a bad cut and paste P I've updated svn and archives to fix it.

Make sure you are using the archives (zip/bz2) or current svn from trunk/. If you are using archive check the revision in revision.php the YAPEAL_VERSION line will let you know which you are running. It should be 1231 or later. Also make sure if you do use archives you cleared out old version before unpacking the new one where you have it installed. Clear just the class/ directory should be enough but it doesn't hurt to backup your config/yapeal.ini file and wipe the whole thing if you still have problems. Also remember the RegisteredCorporation/Character tables can be totally empty when using registered_mode=optional like you are using but do make sure in utilSections that account row's isActive=1 or it'll come back to bite you later.

BTW you can also get the corporationID etc from the accountCharacters table just like Yapeal does for active keys Smile

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

EcicIdol
#23 - 2011-09-16 15:50:28 UTC
Dragonaire wrote:
Actually the Notice error you are getting might be part of the problem you're having as it's a bug that seem to have crape in with a bad cut and paste P I've updated svn and archives to fix it.

Make sure you are using the archives (zip/bz2) or current svn from trunk/. If you are using archive check the revision in revision.php the YAPEAL_VERSION line will let you know which you are running. It should be 1231 or later. Also make sure if you do use archives you cleared out old version before unpacking the new one where you have it installed. Clear just the class/ directory should be enough but it doesn't hurt to backup your config/yapeal.ini file and wipe the whole thing if you still have problems. Also remember the RegisteredCorporation/Character tables can be totally empty when using registered_mode=optional like you are using but do make sure in utilSections that account row's isActive=1 or it'll come back to bite you later.

BTW you can also get the corporationID etc from the accountCharacters table just like Yapeal does for active keys Smile


This fixed my problem. Deleted class folder, updated to 1231 code, and everything is working now. Thank you.

If I wanted to add info from more than one corp, should I use the same DB and just added another corp and key into the utilregisteredkey and utilregisteredcorporation? Or create a new DB for the new corp? I assume that if I use the same DB it will keep all of the records separate for each corp?
Dragonaire
Here there be Dragons
#24 - 2011-09-16 21:04:39 UTC
Yes you can have as many as your system can keep up with in a single DB. Everything is either keyed by keyID, characterID, corporationID in each table. If a column by those names don't exist in the XML I add an ownerID column with the correct type for the section of the API it's in. So for char section API it will be characterID etc

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

EcicIdol
#25 - 2011-09-16 21:43:13 UTC
Perfect. Thank you. My next question is what is the utilgraphics table for? I am assuming that I can use icons from some dump of files. How does that work?
Dragonaire
Here there be Dragons
#26 - 2011-09-17 03:46:49 UTC
The only place in Yapeal that table was used was with some of the scripts in install/. They were used to interface with a GUI installer that I tried with it at one point but few people liked it or used it so it was dropped at least for now. The scripts still exist they are the addTestCharacter.php and addTestCorporation.php scripts. In the installer it would show you pictures of chars/corps to choose from on an account to add to the Yapeal database for testing. At one time the pictures were in the Registered tables but to streamline and normalize them I moved the pics to where they are now. Since they aren't really used in Yapeal you would be free to use them in your application if you want just keep in mind that at some point I may start using them in Yapeal for what they were made for so I would keep them just for character and corporation pictures.

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

Callean Drevus
Perkone
Caldari State
#27 - 2011-09-17 14:30:08 UTC  |  Edited by: Callean Drevus
SectionAccount.php is missing a part of the query in the getSQLQuery function.

The second query for a YAPEAL_REGISTERED_MODE of 'ignored' does not return either a RKActive or a RKMask field, the RKActive of which means that all rows will always be filtered by the function below that, ignoredFilter.

I think it would be good to change this.

In addition, I'm getting:
Quote:
[2011-09-17 14:24:00.718]
NOTICE: SkillInTraining is an unknown API for section char
File: /var/www/core/lib/yapeal/class/util/CachedInterval.php(93)
[2011-09-17 14:24:52.871]
NOTICE: Contracts is an unknown API for section char
File: /var/www/core/lib/yapeal/class/util/CachedInterval.php(93)

Nothing major, but it's odd :P

Developer/Creator of EVE Marketeer

Dragonaire
Here there be Dragons
#28 - 2011-09-17 16:31:10 UTC  |  Edited by: Dragonaire
Your right there was an error in getSQLQuery(). Actually all 3 modes can use the same query so I'm dropping the switch.
(Fixed in revision 1232)

I'm not seeing the notices and I believe those errors were cleared up in a revision of keys so I'm guess you're using an old version of it and not the latest trunk/. There are some errors popping up for some of the API that aren't implemented yet and I'll try to make some changes so Yapeal returns a different error message so it's clearer what is actually happening.

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

Callean Drevus
Perkone
Caldari State
#29 - 2011-09-17 18:04:41 UTC
Actually I just updated to the latest trunk, though with the converted database of an older version, so I guess it might have something to do with that. Not giving problems of any kind though, I believe the tables are even updated even though the notices appear.

Developer/Creator of EVE Marketeer

Dragonaire
Here there be Dragons
#30 - 2011-09-17 18:31:34 UTC  |  Edited by: Dragonaire
Yeah database needs to be updated to get the changes made in util* tables etc

Did a couple more updates the install/*.xml tables that should make database updates work better.

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
#31 - 2011-09-18 18:50:46 UTC
Ok been working on several things over last couple days like killing many bugs in the class/Registered* classes and issues when trying to do database updates with install/createMySQLTables.php. Read trunk/CHANGELOG for a more detailed info on what was changed.

revision 1235

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

Edwardianus
Ministry of War
Amarr Empire
#32 - 2011-09-30 07:17:40 UTC
I have been upgraing my previous yapeal version to a new one to start working with the new api structures?

I am now succesfully downloading all kinds of information through a corp api to start with, but for some reason, I cannot get yapeal to get the conquerable stations downloaded, the corresponding table stays empty. In the sections table, I did mark eve and map data to be downloaded

Any tips??

PS: Yapeal is AWESOME !
Dragonaire
Here there be Dragons
#33 - 2011-09-30 07:28:39 UTC
In utilSections change activeAPIMask to 305 for eve section as that API is off by default.

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

Louis Vitton
Viziam
Amarr Empire
#34 - 2011-10-01 14:29:44 UTC
Hey,

I am a complete noob and have a been coding a php based site myself for use with the API but i am interested if i can use this framework instead.

I want what the full API no gives us but i wish to use the new API system to archive this.

I have downloaded Yapeal but had a lot of issues with getting it running from the guide i was wondering if there is a more detailed guide or if i could get some help.

Cheers Louis
Dragonaire
Here there be Dragons
#35 - 2011-10-01 14:42:59 UTC
Make sure you read the INSTALL.txt file but if you still have some issues after that posting here or join the chat at

Server type: jabber (xmpp)
Room: evephp
Server: conference.eve-corporate.net
Password:
No password for now.

I'm in the room most of the time if not always at keyboard and there's usually a couple other people on there that also know Yapeal that are willing to help out.

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
#36 - 2011-10-03 23:38:29 UTC  |  Edited by: Dragonaire
Just thought I'd let everyone know I've been working on some major refactoring of Yapeal and doing something that has been long over due which is learning how to use PHPUnit to add some much needed testing beyond what is possible now. If I do the refactoring right there should be little or no visible changes to anyone using it but anyone using some of the lower level internal classes in their application will need to make a few changes. For anyone interested you can take a look at branches/queues/ but keep in mind everything is in early alpha at best and nothing really works except some of the classes with finished tests and they may not be in their final forms yet either. Most of them won't work outside the tests for now until some of the other classes have been re-factored as well. Adding the tests and refactoring is slow work because almost everything in Yapeal is either database or network related or both which makes developing tests hard at best. I'm trying to do the classes from class/util/ first as they are the public facing classes everyone should be using plus they are some of the first classes used by yapeal.php as well either directly or indirectly.

Anyway back to work on things.

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

Kossaw
Body Count Inc.
Mercenary Coalition
#37 - 2011-10-04 13:35:08 UTC
Sorry, incoming potentially dumb questions ....

How are the Utilregisteredkey, Utilregisteredcharacter, Utilregisteredcorporation and the four account tables related ? I'm trying to understand how to build a relationship so that I can Create-Reuse-Update-Delete all the CAK's used by an Account, Character or Corporation

WTB : An image in my signature

Dragonaire
Here there be Dragons
#38 - 2011-10-04 16:55:03 UTC
Start by reading http://code.google.com/p/yapeal/wiki/UtilDatabaseTableDependences from there the best thing is to look at the code in some of the classes and understand both the SQL queries and how the filtering in class/Section*.php works. The DocBlocks on ignoredFilter(), optionalFilter(), and requiredFilter() and other comments there should help.

Just to maybe help make things a little clearer Yapeal tries to be at least a little bit intelligent and use any info available from APIKeyInfo in addition to the utilRegistered* tables and won't do stuff with char/ and corp/ section APIs without some of it being available. I do allow you to shoot yourself in the foot by turning APIKeyInfo off but if you do you're on your own.

Also make sure you understand how many to many relationships (don't) work in databases. That's where accountKeyBridge comes in. It's job is to change the many to many relationships between accountAPIKeyInfo and accountCharacters into a couple of one to many relationships instead which the database can handle.

Quote:
I'm trying to understand how to build a relationship so that I can Create-Reuse-Update-Delete all the CAK's used by an Account, Character or Corporation
The above should help you with what you're trying to do but I believe you are also looking at relating multiple keys together in regards to some kind of 'user' account in your application which is beyond the scope of what Yapeal does. Yapeal really only understands keys and that they are sometimes related to characters, corporations, and their APIs nothing more. To manage keys as a group is totally up to the application developer which will probably mean you'll need to have a few database table of your own Blink

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

Kossaw
Body Count Inc.
Mercenary Coalition
#39 - 2011-10-04 23:06:44 UTC
Thanks. yes, linking the CAK's, characters, corporations and accounts to my own user account table is exactly what I'm trying to do. Also, I may have found the reason for -> http://code.google.com/p/yapeal/issues/detail?id=76

WTB : An image in my signature

Dragonaire
Here there be Dragons
#40 - 2011-10-05 04:14:13 UTC
Brought issue 76 back to life and have some new code for you to try as well which you can find in my post there.

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