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
Dragonaire
Here there be Dragons
#481 - 2014-05-27 06:13:39 UTC
Good to hear it Zynen.

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
#482 - 2014-05-31 20:10:58 UTC
So as most of you know have been working on updating Yapeal and part of that is a major re-factoring of all the code. I was kicking around some ideas with another developer and he made suggestion to have history of all the APIs. So as it is now the API data is either deleted and re-added on each API pull or the record is updated depending on some internal technical reasons but the end result is the same that basically there is only access to the most current version of the API data and no way to see how things might have changed.

Now since Yapeal is being changed in a major way which will already have some backward compatibility changes I decided to ask if this was something you guys would find useful? Understand the simple way to do it on the design part is to add an auto-incremental column to all the tables and make a few changes to the keys and indexes. The problem becomes finding the most current record in your queries on a per API and ownerID basis for you. Some other ideas were kicked around but the all were more complex and had other problems that we might or might not be able to overcome.

So to the questions:
Would you like to see some kind of per API history feature added?
Do you think it is worth adding know that probably all of your existing queries will need to be updated?

So let me know what you think and we'll look at it some more based in the feedback I get.

Also if anyone has some ideas on how to add the history but without the drawbacks of how I suggested it could be done please share it and if it works out to being a better way we'll be more than happy to try using it if everyone thinks it the way to go.

As always thanks 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.

Somerset Mahm
Cognitive Distortion
#483 - 2014-06-02 02:10:27 UTC
Which rows have useful history? Stuff like walletjournal is immutable, and I generally only care about the current state of a contract.

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

Dragonaire
Here there be Dragons
#484 - 2014-06-02 03:10:41 UTC
True for some APIs doesn't really matter one that we talked about is AssetList where you'd maybe be able to do audits on where stuff goes etc. MarketOrders might be interesting to as you could see how quickly something is selling or coming in which might be useful. Might be a couple others 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.

Somerset Mahm
Cognitive Distortion
#485 - 2014-06-02 20:49:21 UTC
Dragonaire wrote:
True for some APIs doesn't really matter one that we talked about is AssetList where you'd maybe be able to do audits on where stuff goes etc. MarketOrders might be interesting to as you could see how quickly something is selling or coming in which might be useful. Might be a couple others as well.


I can see the value but to me Yapeal is just an interface between the API and a database; I don't really want it to show data that isn't in the API.

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

Tiberius Zol
Moira.
#486 - 2014-06-03 11:30:51 UTC
Somerset Mahm wrote:
Dragonaire wrote:
True for some APIs doesn't really matter one that we talked about is AssetList where you'd maybe be able to do audits on where stuff goes etc. MarketOrders might be interesting to as you could see how quickly something is selling or coming in which might be useful. Might be a couple others as well.


I can see the value but to me Yapeal is just an interface between the API and a database; I don't really want it to show data that isn't in the API.


Me neither!

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#487 - 2014-06-03 18:01:20 UTC
Ok understand and after looking into it some more we came to same conclusion plus how hard it was looking programming wise. Something else we MAY do is add an event system to Yapeal so people can tie in to things like API retrieved, pre-store etc if they want to to do other stuff but not at a point willing to say it will make in at this time. Not plan that they will be able to change anything just know what's going on and maybe some read-only access to data in the pipeline to allow people to do their own thing if they want. It has advantage that if you don't need it you can ignore it and doesn't change how you use Yapeal.

Anyway thanks for the feedback.

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

Aquila Sagitta
Blue-Fire
#488 - 2014-06-11 04:51:25 UTC
How do I get this to work with WAMP?

I can't figure out how to give it no password for the database. I leave it blank it complains no matter what I do.
Jone Sad
Doomheim
#489 - 2014-06-11 05:12:51 UTC  |  Edited by: Jone Sad
Aquila Sagitta wrote:
How do I get this to work with WAMP?

I can't figure out how to give it no password for the database. I leave it blank it complains no matter what I do.

First you should setup your http server, after then TRY to use yapeal. ;) If you cannot setup such simple thing, maybe you should not use this library? How will you use php library if you cannot do such simple thing... Every time asking 'how' here? XD It's not 'php for dummies forum' isn't it? Twisted

PS: Pay for some one, who will do it for you. Cool But it won't solve ALL your problems.
Aquila Sagitta
Blue-Fire
#490 - 2014-06-11 06:57:42 UTC
It is set up. I've got my website running fine with all my backend in place I'm just trying to get Yapeal to work. Yes I'm a novice and using command line is foreign to me for setting things up so I'm having problems passing blank parameters even though its blank in the config file and *should* work but it doesn't. So I mean if you could be helpful instead of pretentious that'd be great...
Louis Vitton
Viziam
Amarr Empire
#491 - 2014-06-11 07:36:41 UTC
Hey mate,
If you are having issues please advise the errors your getting as well as also posting any configuration file information to here http://pastebin.com/ for us to look at.
Please remove all password and usernames first.

Post the commands you are using on the command line also please.

Cheers,
Louis
Aquila Sagitta
Blue-Fire
#492 - 2014-06-11 16:27:57 UTC
The only problem I'm having is it won't accept no password. Is there any way I can leave the password blank? I mean currently its blank but it complains there's no password and won't run...
Dragonaire
Here there be Dragons
#493 - 2014-06-11 17:15:13 UTC
Aquila Sagitta - Louis Vitton does have some good points that it helps to know what errors you are getting it also helps to know if you are having problem running yapeal.php itself or one of the install scripts and which version as well but I'll try to help anyway because the basic problem of how to do a empty parameter is the same on the command line. I'll use the install/createMySQLTables script in this example.

Windows:
php -f install/createMySQLTables.php -u"YapealUser" -p ""

Notice the two double quotes for the password option. It's really the same idea as in the INI file. Helpfully that get's you past the problem you were having.

Jone Sad - I'll assume you really were trying to be helpful with a sense of humor about you suggestions but it didn't come across that way to anyone. If that was NOT your intent then please don't make those types of post here. I understand you may NOT like post about what you find easy and not related to Yapeal directly but my view on it is helping out someone trying to use Yapeal is always worth doing and when I think they could be better served getting addition help elsewhere I usually direct them to it.

In other news I'll be making an announcement about plans for Yapeal but I'll do it in a different post once I finish up something on my end later today.

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

Aquila Sagitta
Blue-Fire
#494 - 2014-06-11 18:22:45 UTC
Dragonaire
Here there be Dragons
#495 - 2014-06-11 22:45:37 UTC
Okay so windows being extra pain here try
php -f install/createMySQLTables.php -- -u"YapealUser" -p ""

Note added double dash after script name.

Also per the errors it's returning looks like you deleted or changed something you shouldn't have in the INI file for it to say problem with [Database]. Might try making a copy from the yapeal-example.ini file again and just edit it as needed. Main thing to watch for is no missing quotes and make sure to use double quotes NOT single quotes. Also since using Windows make sure you're not using MS Office etc for edits as it'll replace them with curly quotes which don't work. If you have to try using notepad or any of the many programmer friendly editors out there for free or paid. I current use PhpStorm for my IDE and Notepad++ for extra outside of project edits.

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
#496 - 2014-06-12 00:35:51 UTC  |  Edited by: Dragonaire
Okay as I said have Announcement to make about Yapeal development etc.

Some of you might have notice I pushed out a new Tagged version today 1.0.5 and for those of you that read the commit message I expect this to be the last version in the 1.0.x series. All future development is going to be in what is currently know as the 1.1.x series but naming subject to change depending on if I think that semantic version rules require something different. Everyone should start now on getting ready for using the new version as I expect to have fairly complete versions out Soon (tm).

Backward compatibility breaks in 1.1.x:

  • Uses PHP Namespaces so minimum version is PHP 5.3 but expected minimum is version 5.3.10 do to some PHP bugs.
  • Yapeal uses mysqli instead of mysql for install scripts and PDO for main library. May be moving to PDO only in near future.
  • INI config file going away to be replaced by Yaml instead. Other options may become available in the future but INI will NOT be one of them.
  • Database changes. Most of these are cleanup on existing tables but several of the util* ones are being change/merge/deleted.
  • Many 'That would be cool and someone might use them' minor features are being killed.
  • Others I just can't think of right now.


Benefits/ improvements expected with 1.1.x:

  • Direct one-shot API calling instead of just automated randomized scan mode. This can be used for thing like web site account sign-up and key verifying.
  • Yapeal goes fully OOP. You'll still be able to run it from crontab etc and it is still expected to mostly be used this way but you'll now have option to call the main Yapeal class directly and the per API classes also with little work.
  • Uses Composer and Packagist. If you also use Composer in your project this should make using it a one line addition to your composer.json.
  • Console tools. Many of the existing scripts used during install and new ones being added will use symfony2/console which should make them much more user-friendly.
  • Faster. May or may NOT be noticeable do to network and database operations but should be.
  • Testable. Some of the new code already has PHPUnit tests and most should have some before final release.
  • Others I just can't think of right now.


By no means are the lists complete but they should give you some idea what to expect. I will also add that changes to both lists are likely but only additions are expected to the first on the second it's more in flux as development is still ongoing. If you have ideas or code you think should be added to Yapeal please contact me as I'm open to suggestions on how to make it better and easier to use for everyone.

If you would like to help please contact me or try out the 1.1.x branch from GitHub. Areas I really need help in is testing as I only have access to a couple keys myself with mostly inactive chars. Bug reports from your testing with more data would be very helpful.

If you like to living on the edge try out the 1.1.x-WIP branch but be warned it's often broken and very incomplete as that's where I and another developer do our development work on the new stuff and often commit Work-In-Progress as the name implies.

Alright I'll end this here and sorry for the long post but had a lot of stuff I wanted to get out. As always thanks 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.

Aquila Sagitta
Blue-Fire
#497 - 2014-06-12 00:38:32 UTC
Same problem

Redid yapeal.ini and only changed user/password stuff. Are you sure it can take no password?
Dragonaire
Here there be Dragons
#498 - 2014-06-12 02:18:43 UTC
Okay actually looked at the code in testForMySQLDatabasePrivs.php and because of the way it test for the required settings it would NOT allow a empty password. All the other script I sure also would NOT allow it either so sorry I didn't check that part sooner but as my above post shows been busy with other Yapeal related stuff.

Guess the reason it's never really come up before is even on a local only install like with WAMP it doesn't normally let you create a user with a blank password as far as I know. PhpMyAdmin I know doesn't allow them. Easiest fix is just to give the user you want to use a password. Something like 'abc123' is fine if it's only being used for some local testing and behind a good firewall.

I actual use the default user and password from the example file during testing here locally all the time since I don't have anything in it but the public key and sometimes a couple others and nothing but Yapeal using the database. I also been known to dropping all the tables or whole databases several times a day during testing.

Anyway sorry for NOT checking the code sooner but I rarely look at the old code except once in a while to check how I did something before so I make sure to do it differently this time because I like new bugs Blink

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.
#499 - 2014-06-16 09:00:59 UTC
After the update to 1.0.5 i get this warnings:

2014-06-16 08:40:08.852
WARN: Caching invalid API XML for char/ContactList
File: /eve/yapeal/class/YapealApiCache.php(177)
2014-06-16 08:40:08.876
WARN: Row was missing required fields (inWatchlist) that are needed for yapeal_charContactList
File: /eve/yapeal/class/YapealQueryBuilder.php(211)

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#500 - 2014-06-16 18:55:08 UTC
Tiberius Zol - Did a push to master branch give it a try and see if it fixes your issue. I added issue #14 on GitHub as well for it. I'll have some comment there about it.

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