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
6ie
The Kiwis
#421 - 2013-08-15 13:05:00 UTC  |  Edited by: 6ie
If the DB user has full access to all databases (%), rather than only the database specified in yapeal.ini, then testForMySQLDatabasePrivs.php fails, listing that all privileges are missing. (which means you cant use user root either).

Is there a list somewhere of sections? or is account, char, corp, eve, map, server all there is to enable?

Thanks for the tool BTW.
Louis Vitton
Viziam
Amarr Empire
#422 - 2013-08-24 22:27:25 UTC
The list of sections is under utilSections table
Kitten Lasers
Republic University
Minmatar Republic
#423 - 2013-08-30 04:35:32 UTC
Thanks for maintaining Yapeal.

An issue I've run into is where the keys I store are user submitted, so the end user might disable the key in their Eve API management page, and I'll start getting 403 errors when Yapeal runs. What's the best way to have it so that a key gets set to inactive on 403 errors?
Somerset Mahm
Cognitive Distortion
#424 - 2013-08-31 18:28:22 UTC
This is an artifact of the new system PrismX has set up where it uses actual HTTP error codes.

I will fix this so Yapeal handles them correctly.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Shang Ghjuvan
Shang Ghjuvan Corporation
#425 - 2013-09-02 16:51:02 UTC  |  Edited by: Shang Ghjuvan
I'm trying to get yapeal to work, i've downloaded the latest copy and am getting

FATAL: Uncaught exception in yapeal.php
File: /home/warptome/public_html/_/yapeal/yapeal.php(183)
2013-09-02 16:49:22.968
FATAL: The APIs: KillLog are unknown in section char
Trace:
#0 /home/warptome/public_html/_/yapeal/class/ASection.php(100): AccessMask->apisToMask(Array, 'char')
#1 /home/warptome/public_html/_/yapeal/class/SectionChar.php(62): ASection->__construct()
#2 /home/warptome/public_html/_/yapeal/yapeal.php(163): SectionChar->__construct()
#3 {main}


EDIT: Fixed, had to delete class/api/char/charKillLog.php
Somerset Mahm
Cognitive Distortion
#426 - 2013-09-04 04:11:41 UTC
Yep, if you just unzip a copy over the top it will have old files.

The safest way to upgrade, if you can, is to set up a Mercurial clone and sync when updates are released.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Sabeca
Brutor Tribe
Minmatar Republic
#427 - 2013-09-12 22:05:20 UTC
Hi,
is there any way how i can easly check if a api key + V-Code is valid without insert him into the database?

I want to insert a login and registration to my homepage wich give a error while the registration when the combination isnt valid.

greeting Sabeca
Somerset Mahm
Cognitive Distortion
#428 - 2013-09-13 01:33:24 UTC
Sabeca wrote:
Hi,
is there any way how i can easly check if a api key + V-Code is valid without insert him into the database?

I want to insert a login and registration to my homepage wich give a error while the registration when the combination isnt valid.

greeting Sabeca


Yapeal isn't designed to do this. You'll want to either use something like Pheal, which is just a wrapper around calls to the API directly, or even just make this call yourself and manually parse the result.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Sabeca
Brutor Tribe
Minmatar Republic
#429 - 2013-09-13 10:18:41 UTC
Hmm ok,
Thanks for the quick answer i will try it with PhealNG cause i have no idea how i make a call and to parse it succesfull... ( is there any guide or something similar ? )
Mikokoel
Mining Industry Exile Foundation
Synergy of Steel
#430 - 2013-09-13 13:58:03 UTC
Part of my own corp tool:

http://pastebin.com/hPFKBNYX

Maybe that helps...

Mikokoel | Head FC League of Unaligned Master Pilots

Cypherous
Liberty Rogues
Aprilon Dynasty
#431 - 2013-09-16 11:42:40 UTC
Sabeca wrote:
Hi,
is there any way how i can easly check if a api key + V-Code is valid without insert him into the database?

I want to insert a login and registration to my homepage wich give a error while the registration when the combination isnt valid.

greeting Sabeca


I just have it set up to check the CAK mask of the key before adding it to the database, part of that is a check to see if the key can be accessed

http://pastebin.com/93GA05NZ

Yes my code is bad so sue me :P
Sabeca
Brutor Tribe
Minmatar Republic
#432 - 2013-09-19 01:46:35 UTC
Cypherous wrote:
Sabeca wrote:
Hi,
is there any way how i can easly check if a api key + V-Code is valid without insert him into the database?

I want to insert a login and registration to my homepage wich give a error while the registration when the combination isnt valid.

greeting Sabeca


I just have it set up to check the CAK mask of the key before adding it to the database, part of that is a check to see if the key can be accessed

http://pastebin.com/93GA05NZ

Yes my code is bad so sue me :P



Nice, thanks! I will have a look on it. And my code is not any better than yours :P
Dragonaire
Here there be Dragons
#433 - 2013-10-07 06:42:41 UTC
Hi everyone just thought I'd let everyone know I pushed out a new version of Yapeal. No real changes to be had from what Somerset Mahm had put out. I updated the copyright and started adding stuff to Yapeal to work with Composer.

Does this mean your going to start working on Yapeal again, you might ask?Kind of. Let me explain.

Yapeal as it is now works of course though there are some problems with it do to API server changes I understand. Unfortunately it could be said that it's legacy code as used in the more Modern interpretations section even to me now after being away from it for a few months and I wrote 99% of it Oops

So what I've decided to do is what I wasn't up to doing a few months ago, rewrite it, but this time starting really with a clean sheet but still keeping the better parts of the existing code. Since I'm basically starting over anyway I'm going to try writing the new version of Yapeal as though I was doing it for the first time with all of the knowledge I have now about write a PHP application/library unlike before when often the first time I tried something new it was in Yapeal to mixed results Blink

What does this all mean? The version I tagged as yapeal-1.0.3 is the last expected version in the 1.0.x development chain that lead to it. There may be a few more bug fixes done if Somerset Mahm decided to keep it go and I'll help with some of those if needed but the main focus will be on working toward Yapeal 2 instead.

What to expect in Yapeal 2:

  • Composer as main dependence tool / install method.
  • Use common standards where a good one exists. Standards like the PSR-0 etc make for less work both for me and others in understand and using Yapeal.
  • Use PHPUnit from the start. I thought about going with Extreme Programming but just haven't got my head fully around it, plus I don't see it working since I don't have a 'client' handy to work with.
  • Move environment requirements forward. I.E. PHP 5.3, PDO etc to move away from legacy ways of doing stuff.
  • Maintain some form of backward compatibility. Keep the simple CLI type interface for current users but make changes that allow a much easier integration of Yapeal into modern OOP projects that usually use mod_php on a web server.
  • Many other things that I can't think of right now but I'll probably go into more in the future.


That's a short list and I'll be writing more about things as the project continues but on to another aspect of the changes.

How can I help? Glad you asked Big smile
To make things work I'll need people trying out the new code as I release it. I also need ideas on what people would like to see changed or added to Yapeal as a core feature. Also I would find it useful to hear more about how people are currently use Yapeal and any problems they had to overcome or things they had to do to work around something they found lacking with Yapeal. I know some of these from reading many of the past forum posts but I'd still like to hear it directly from as many of you as I can because though many of you may have similar needs the way other person writes about it can provide extra insight for everyone and especially me.

You can also help by join me in writing the code. There's lots of work to be done and many part of that are still just ideas in my head but there is stuff that I need help with already, plus I work better when I have someone to bounce ideas off of and to look over my shoulder once in a while as well.

Ok that's it for now I'm off to bed and look forward to seeing everyone's comments.

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

qu1ckkkk
The Warp Core Stabilizers
#434 - 2013-10-08 09:48:43 UTC
Somerset Mahm wrote:
This is an artifact of the new system PrismX has set up where it uses actual HTTP error codes.

I will fix this so Yapeal handles them correctly.


I'm curios on how you are going to go about this? Will setting a key to no longer being active in utilRegisterdKey be a viable option if the call goes 403 Forbidden for API https://api.eveonline.com/account/APIKeyInfo.xml.aspx ?

Proud developer of SeAT! A Simple Eve API & Corporation Management Tool.

Project Page: https://github.com/eveseat/seat

Somerset Mahm
Cognitive Distortion
#435 - 2013-10-08 21:20:07 UTC
qu1ckkkk wrote:
Somerset Mahm wrote:
This is an artifact of the new system PrismX has set up where it uses actual HTTP error codes.

I will fix this so Yapeal handles them correctly.


I'm curios on how you are going to go about this? Will setting a key to no longer being active in utilRegisterdKey be a viable option if the call goes 403 Forbidden for API https://api.eveonline.com/account/APIKeyInfo.xml.aspx ?


That is my plan; Yapeal handles the old behavior in just this way. So it's just a matter of moving the error-handling logic up a level since now the error is at the HTTP level.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

qu1ckkkk
The Warp Core Stabilizers
#436 - 2013-10-09 07:39:28 UTC
Somerset Mahm wrote:

That is my plan; Yapeal handles the old behavior in just this way. So it's just a matter of moving the error-handling logic up a level since now the error is at the HTTP level.


Excellent. I have haxed together a temp workaround to do this in class/YapealNetworkConnection.php to just do $regKey->isActive = 0; so that I don't 403 too much. Thanks for the update =)

A last question I have. How are you guys handling resolving the names of the characterID's in `charMailMessages`? I was thinking of just making another table for the purpose of id->name resolution instead of querying the API every time. Interested to hear what others have done here.

Proud developer of SeAT! A Simple Eve API & Corporation Management Tool.

Project Page: https://github.com/eveseat/seat

Somerset Mahm
Cognitive Distortion
#437 - 2013-10-09 16:35:15 UTC
I personally have a two-layer system-- I fetch id->name pairs and store them in a db and also store them in a memcache instance.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Tiberius Zol
Moira.
#438 - 2013-10-21 19:59:42 UTC
Hi guys,
at the moment i try to integrate the open buy and sell orders in a table but get some old orders and i don't know why. Maybe one of you give me a hint:

This is the code:
SELECT yapeal_charMarketOrders.*, invTypes.typeName FROM yapeal_charMarketOrders, invTypes
WHERE yapeal_charMarketOrders.ownerID=MYOWNID
AND yapeal_charMarketOrders.bid=1
AND yapeal_charMarketOrders.volRemaining!=0
AND yapeal_charMarketOrders.orderState=0
AND yapeal_charMarketOrders.issued + INTERVAL yapeal_charMarketOrders.duration DAY > NOW()
AND invTypes.typeID=yapeal_charMarketOrders.typeID

Mr. Tibbers on twitter: @Mr_Tibbers

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

Marcus Covinus
The Blood Ankhs
#439 - 2013-10-22 00:28:58 UTC
I could use a point in the right direction...

Fatal error: Class 'ADODB2_' not found in /home/classified/html/yapeal/ext/ADOdb/adodb.inc.php on line 4371

This happens when running ./createMYSQLTables

Thanks.
Marcus Covinus
The Blood Ankhs
#440 - 2013-10-22 00:43:33 UTC
Marcus Covinus wrote:
I could use a point in the right direction...

Fatal error: Class 'ADODB2_' not found in /home/classified/html/yapeal/ext/ADOdb/adodb.inc.php on line 4371

This happens when running ./createMYSQLTables

Thanks.



Disregard I'm an idiot.