open All Channels
seplocked EVE Technology Lab
blankseplocked Ale - API Library for EvE (PHP)
 
This thread is older than 90 days and has been locked due to inactivity.


 
Pages: [1] 2

Author Topic

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.01.24 01:47:00 - [1]
 

Edited by: Yorick Downe on 24/01/2009 02:18:21
Edited by: Yorick Downe on 24/01/2009 02:17:07
Ale - API Library for EvE

Current release: 0.23 "Eldstrom's Effort"
Supports all EvE-Online functions and EvE-Central functions, with file caching and utility functions and such. Comes with full documentation and sample code.

Home of the project is on SourceForge
There's an EvE Wiki entry, too.
And a home on the EvE-Dev Wiki, okay that's enough now.

This library requires PHP 5, in some instances 5.1.x. Do yourself a favor and run a recent 5.2.x or at least 5.1.x.

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.01.24 01:56:00 - [2]
 

Release verbage about 0.23 in a separate post so I can edit the original post with impunity.

With the release of 0.23, we've renamed ourselves from eve-apiphp to "Ale". Mainly because other options were already taken. *shakes fist in the general direction of yapeal and the gazillion "eveapi" projects out there*

0.23 is titled "Eldstrom's effort" because Eldstrom went and implemented every single last EvE-Online API function, then turned around and added EvE-Central to it, then added test functions for it all. It's been so long in coming because Yorick was goofing off.

Consider 0.23 to be an attempt at a "feature-stable" release still based on Kw4h's old code. A rewrite following OOP principles has been long overdue, not least to make it easier to tie the library to a DB, and that effort, dubbed 0.5x, can be viewed in a very "in-progress" form in SVN.

0.2x will stick around, we'll provide bug-fixes. Don't expect large feature additions, though, those I'd rather see on the 0.5x branch.

Hmm, caveats - the CharacterSheet parser changed, that'll break your legacy code if you've been using getCharacterSheet. Sorry, but the "info" index had to go, it was based on pure fantasy, as it doesn't turn up anywhere in the XML.

The "one-two-punch" parsing is still here, as is the very function-oriented rather than OOP design of it all. 0.23 isn't meant to break your code - at least not too much - it's meant to make you stick around while we figure out how we want 0.5x to look.

Because so much was added - all kinds of utility functions, caching logic now understands "retry after" and can change cachedUntil accordingly, the entirety of the API functions - there have got to be bugs we missed. Please point those out to us, either in this thread or via EvE-Mail, and they'll be fixed.

Oh yeah, utility functions - grab the error code and text, set the user agent (EvE-Central likes that), figure out the caching time and cache expiry, all kinds of stuff. Still, you know, not OOP, but the next best thing that could be done in the existing framework. Knock yourselves out, everything should be documented in the Doc folder.

Dragonaire
Caldari
Corax.
PURgE Alliance
Posted - 2009.01.25 02:33:00 - [3]
 

And here I thought Yapeal had killed off all the others Laughing
Really I'm glad to see someone taking it up again and moving it forward always thought there was room for more then one PHP API library because they each have they're place where they fit in better. Looking forward to see what you do with it.

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.01.25 12:13:00 - [4]
 

I couldn't agree more. A year ago, when I was looking for a PHP API Library for a little project, there was nothing really out there - a couple incomplete classes, and Kw4h's code, nearly functional but abandoned at the time. Now, there are two libraries that are functional, each taking a very different approach to caching and general use. And that's the way it should be.

When - or maybe if Embarassed - Ale undergoes its transformation to OOP, it'll be in no small measure due to yapeal. Your project is an inspiration, in that "good enough" is no longer good enough, and the many "oh wouldn't it be nice if" ideas that take effort to implement suddenly take on a greater urgency, so as to not be left behind in the dust by the "rival" project.

Riley Masterson
Posted - 2009.01.28 07:06:00 - [5]
 

I have high hopes for the Eve-Central API stuff. I've got no skills when it comes to parsing XML, so hopefully this will save me some trouble.

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.01.28 10:45:00 - [6]
 

Riley, cool! Let us know if you run into snags, or find *gasp* a bug. Feedback is always welcome.
One of the things the EvE-Central author is keen on is that applications identify themselves with a unique user agent - be a sport and use $api->setUserAgent('name-of-my-app'); to make the EvE-Central author happy.Smile
Oh, and in case that's not clear from the documentation: EvE-Central does not have cachedUntil hints. As a result, the library uses "sane" timeout defaults chosen after discussion with the EvE-Central author. If those defaults don't work for your application, you can pass in different timeout values.

Commander Ashik
Minmatar
Jolly Roger Services
Posted - 2009.01.28 19:20:00 - [7]
 

Edited by: Commander Ashik on 28/01/2009 20:14:38
I've received the following errors when using class.charactersheet.php:

Quote:

Notice: Undefined index: skills in
H:\Test Server\www\
API Module\backend\class.charactersheet.php on line 86

Notice: Undefined index: certificates in
H:\Test Server\www\API Module\backend\class.charactersheet.php on line 86

Notice: Undefined index: corporationRoles in
H:\Test Server\www\API Module\backend\class.charactersheet.php on line 86

Notice: Undefined index: corporationRolesAtHQ in
H:\Test Server\www\API Module\backend\class.charactersheet.php on line 86



Im using the default class.charactersheet.php provided in the download.

Line 86 is the following:
Quote:

$index = count($output[(string) $rsname]);



My server version is:
Apache Version : 2.2.11
PHP Version : 5.2.8

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.01.28 22:56:00 - [8]
 

This was caused by an error in how class.charactersheet.php calculates an index. Thank you for reporting that.

Eldstrom fixed it. The fix is in SVN - you can grab it from here: http://eve-apiphp.svn.sourceforge.net/viewvc/eve-apiphp/trunk/eveapi/class.charactersheet.php?view=log

Or you could apply this diff (possibly even manually, since it's so short):


--- class.charactersheet.php-rev177.svn000.tmp.php Wed Jan 28 17:42:48 2009
+++ class.charactersheet.php Wed Jan 28 17:36:08 2009
@@ -81,13 +81,14 @@
{
$rsatts = $rs->attributes();
$rsname = $rsatts[(string) "name" ];
+ $index = 0;
foreach ($rs->row as $row)
- {
- $index = count($output[(string) $rsname]);
+ {
foreach ($row->attributes() as $name => $value)
{
$output[(string) $rsname][$index][(string) $name] = (string) $value;
}
+ $index++;
}
}
unset ($xml); // manual garbage collection


We'll wait for more feedback (and bugs found :)) before releasing a bugfix point release.

Commander Ashik
Minmatar
Jolly Roger Services
Posted - 2009.01.29 03:34:00 - [9]
 

Here is another quick fix to the above problem:

Quote:

foreach ($xml->result->rowset as $rs)
{
$rsatts = $rs->attributes();
$rsname = $rsatts[(string) "name"];
$index = 0;
foreach ($rs->row as $row)
{
foreach ($row->attributes() as $name => $value)
{
$output[(string) $rsname][$index][(string) $name] = (string) $value;
}
$index = count($output[(string) $rsname]);
}
}
unset ($xml);


Amazack
Posted - 2009.01.29 13:31:00 - [10]
 

I've been using your PHP class for a while, but never really made a comment on how I found it.

Without this class, I would be stuck doing it myself, but with this it saves me so much time to do the other features of my corp site.

Going to test out this new version, and I'm sure I'm going to be playing around with the features for a few hours now.

Thanks alot for the class and thanks to everyone for contributing code.

Bai Guang
Caldari
Perkone
Posted - 2009.01.30 22:15:00 - [11]
 

Very interesting. I really like the idea of the "one stop shop" for both EVE API, and EVE-Central API. Once this goes OOP, the other guys on the block better watch out Laughing

Harrash
Posted - 2009.02.01 14:04:00 - [12]
 

Edited by: Harrash on 01/02/2009 14:04:24
For character sheet, I get the following errors:

Notice: Undefined index: skills in /home/josh/www/eclipseinnovations/lib/class.charactersheet.php on line 86

Notice: Undefined index: corporationRoles in /myloc/lib/class.charactersheet.php on line 86

Notice: Undefined index: corporationRolesAtHQ in /myloc/lib/class.charactersheet.php on line 86

Notice: Undefined index: corporationRolesAtBase in /myloc/lib/class.charactersheet.php on line 86

Notice: Undefined index: corporationRolesAtOther in /myloc/lib/class.charactersheet.php on line 86

Notice: Undefined index: corporationTitles in /myloc/lib/class.charactersheet.php on line 86


woops, I am amazack, this was my first char. Rolling Eyes

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.02.01 14:49:00 - [13]
 

Amazack, see post #8 and use the fixed class.characterSheet.php.

I did not wish to do a point release for such a small change, but we may have to, if people keep running into it :).

Amazack
Posted - 2009.02.02 16:25:00 - [14]
 

Originally by: Yorick Downe
Amazack, see post #8 and use the fixed class.characterSheet.php.

I did not wish to do a point release for such a small change, but we may have to, if people keep running into it :).



Thanks, going to try that.

Cryten Jones
Gallente
Advantage Inc
The Matari Consortium
Posted - 2009.02.04 01:36:00 - [15]
 

HI guys,

I am just starting out on this whole api thing. I have to say that assuming it works (and I see that it does :) ) this will turn a pipe dream project into a possible project!!


I am having a small issue on the install side, when running the sample code it looks like the server does not have the rights to create the cache files. I only know a little Linux but am learning fast, could anyone point me in the right direction?

I am using Ubuntu with Apache2 and have set-up the website in my home dir.
Both HTML and PHP files display as expected.

Thanks for any advice.

-CJ



Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.02.06 01:30:00 - [16]
 

Originally by: Cryten Jones

I am having a small issue on the install side, when running the sample code it looks like the server does not have the rights to create the cache files. I only know a little Linux but am learning fast, could anyone point me in the right direction?

I am using Ubuntu with Apache2 and have set-up the website in my home dir.



Depends on what user Apache is running on, what sub-directory you have it going to - home dir itself or a subdir? - and what the permissions are. You can always do a chmod 777 ~/htdocs (assuming ~/htdocs is the root dir for Apache, replace with what it actually is) and be done with it :)

xampp may also help you out, it's a ready-to-go apache/mysql package.

Eldstrom
Posted - 2009.02.06 12:19:00 - [17]
 

Edited by: Eldstrom on 06/02/2009 12:33:47
Originally by: Cryten Jones
HI guys,

I am having a small issue on the install side, when running the sample code it looks like the server does not have the rights to create the cache files. I only know a little Linux but am learning fast, could anyone point me in the right direction?





As Yorrick said a chmod 777 works for testing/playing but I wouldn't do that to any live system, the default cache directory is ./xmlcache so also check it exists unless you've set a cache directory and restrict the chmod to that.

Eld

Amazack
Posted - 2009.02.08 13:31:00 - [18]
 

You will want to make a .htaccess in xmlcache with the following:
AllowOverride All

order deny,allow
deny from all


You don't want people accessing your (and your users) API information, right?

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.02.08 14:53:00 - [19]
 

Edited by: Yorick Downe on 08/02/2009 14:57:35
Alternatively, if running on a host that doesn't have .htaccess (I'm looking at you, 1and1), you could do this index.php - not as good as .htaccess though, since you can still guess (or brute-force) your way into the cache:

<?php
die("oh god oh god we're all gonna die!");
?>

[Edit] Okay now I'm getting paranoid - maybe 0.24 will need a way to write the cache as .php files that die(); so that they can't be called up on a browser.
[Edit 2] The idea to announce "I know you are listening!" to an empty room becomes more attractive by the second.
[Edit 3] I just did. Are they? Are they?!?

babablacksheep
Posted - 2009.02.20 06:38:00 - [20]
 

Edited by: babablacksheep on 20/02/2009 06:39:58
Is there a way to also grab current clone information? Or did I miss it?

Lumy
Minmatar
Sebiestor Tribe
Posted - 2009.02.20 10:37:00 - [21]
 

Edited by: Lumy on 20/02/2009 10:37:33
Planned for new release:

1. Database cache.
2. File cache will allow you to set cache root outside server root through
. a) config file (.ini)
. b) defined constant (ALE_CACHE_ROOT or something like that)

Yorick Downe
Caldari
Agony Unleashed
Agony Empire
Posted - 2009.02.21 11:33:00 - [22]
 

Originally by: babablacksheep

Is there a way to also grab current clone information? Or did I miss it?


The API does not currently offer any Jump-Clone information at all. You can get information on which Medical Clone you have (but not its location) from getCharacterSheet.

See also this discussion.

Eldstrom
Posted - 2009.03.17 11:43:00 - [23]
 

Support for skill queue has been added to the SVN on SourceForge.
under trunk.

Eld

Eldstrom
Posted - 2009.03.18 14:33:00 - [24]
 

Ok CCP have changed the format of the skillqueue api xml file
Updated to the class.skillqueue.php file committed to the svn under trunk/


Eld

Fatal Reality
Gallente
Posted - 2009.04.11 06:52:00 - [25]
 

Installed, api test is failing with the cache. Has the API changed for latest release?



New character selection function matches legacy character selection function output.

Here's the raw array output of your corp members, hudine. Enjoy!

<b>Info</b>: loadCache: Fetched cache file:./xmlcache/155850/account/Characters.xml.aspx</br>
<b>Info</b>: isCached: Cache file does not (yet?) exist: ./xmlcache/155850/characterID/corp/MemberTracking.xml.aspx</br>
<b>Api</b>: Invalid characterID.</br>
<b>Info</b>: isCached: Cache file does not (yet?) exist: ./xmlcache/155850/characterID/corp/MemberTracking.xml.aspx</br>

KtoJest
Minmatar
Silkroad Partners
Posted - 2009.04.20 15:00:00 - [26]
 

this is an amazing piece of work.
i had been using the original api until it died.
manipulating, with agony, xml etc. to do mkt analysis.
now i can do so much more with so much less.

thank you very much

the best-

ps i found class.skillqueue.php: tags/0.23b/eveapi/class.skillqueue.php (18.03.09)

KtoJest
Minmatar
Silkroad Partners
Posted - 2009.04.20 15:20:00 - [27]
 

this is an amazing piece of work.
i had been using the original api until it died.
manipulating, with agony, xml etc. to do mkt analysis.
now i can do so much more with so much less.

thank you very much

the best-

ps i found class.skillqueue.php: tags/0.23b/eveapi/class.skillqueue.php (18.03.09)

Lumy
Minmatar
Sebiestor Tribe
Posted - 2009.04.20 16:51:00 - [28]
 

Hi. Just to note here, too. There has been new release (a while ago ;) ). More info here.

KtoJest
Minmatar
Silkroad Partners
Posted - 2009.05.10 06:26:00 - [29]
 

2 questions:

-Is it still possible to download market orders?

It seems to download because the time-stamp changes on the file but the file contents is always the same. Most recent record is 13.April

-Character portrait downloads the '!' image. Any ideas why?

the best-


Luna Harkor
Posted - 2009.07.18 03:51:00 - [30]
 

I have put together a small patch that will enable PostgreSQL Database Caching options for this package, the URL to download the patch is via sourceforge:

https://sourceforge.net/tracker/download.php?group_id=233060&atid=1088419&file_id=335457&aid=2823292


Pages: [1] 2

This thread is older than 90 days and has been locked due to inactivity.


 


The new forums are live

Please adjust your bookmarks to https://forums.eveonline.com

These forums are archived and read-only