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.
 

Development

First post First post
Author
bogdica19 bodica
Royal Amarr Institute
Amarr Empire
#1 - 2014-12-29 06:57:20 UTC
Hello, i'm not sure if this is teh right place to post my question but i'll give it a shot aniway....I was wondering if there is any guide. documentation or example of how to use the api key access into an application(basically using php/javascript ...)
Sorry again if this isn't the right section for my post
Have a nice day and fly safe
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2014-12-29 11:15:02 UTC
if you're meaning the old XML api, I'd suggest looking into phealng, which takes care of a lot of the API stuff (caching and so on)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Martin T
Gnostic Ascension
#3 - 2014-12-29 17:48:20 UTC
A good place to use as a reference is https://neweden-dev.com/Main_Page

The API is fairly straight forward to use. In PHP you can fetch pages in a number of ways, the simplest of which probably file_get_contents. The results are all XML. Here's a quick example of reading the nullsec outposts:

$xml = new SimpleXMLElement(file_get_contents("https://api.eveonline.com/Eve/ConquerableStationList.xml.aspx"));
foreach ($xml->result->rowset->row as $i => $row) {
    $attr = $row->attributes ();
    ...$attr->stationName...
}
Dragonaire
Here there be Dragons
#4 - 2014-12-29 19:49:39 UTC
First don't re-invent the wheel by trying to access the Eve API directly. Instead if using PHP go with either phealng or Yapeal which take care of a lot of the details required to deal with the Eve API servers directly. There are libraries for other languages as well out there. Using a library let's you get on with the actual application design vs spending days, weeks, months or more try to figure out something that's already been done by someone else Blink

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

Martin T
Gnostic Ascension
#5 - 2014-12-29 23:08:09 UTC  |  Edited by: Martin T
Dragonaire wrote:
First don't re-invent the wheel by trying to access the Eve API directly. Instead if using PHP go with either phealng or Yapeal which take care of a lot of the details required to deal with the Eve API servers directly. There are libraries for other languages as well out there. Using a library let's you get on with the actual application design vs spending days, weeks, months or more try to figure out something that's already been done by someone else Blink


While I generally agree with what you said, I think both the XML API and CREST are easy enough to work with at a low level that reinventing the wheel doesn't cost you that much more time.
Also don't forget that if you're using another library for the functional part and only need the Eve APIs to feed it data, mashing the two together and making sure they play along nicely can be more frustrating than just doing it yourself.
Last time I tried using a "3rd party library" (an api launched by devs, wrapped by another dev, so a 3rd dev could use it...) I had to struggle with the lack of documentation and the calls I needed it for turned out to be outdated and crashed due to changes in the schema.
If you only need a handful of calls (and in the case of CREST there are only a handful of calls - apart from the tournament stats everything's in the SDE) it's faster just to implement them and you get the benefit of not having to wait for someone else to update his code when something changes.

Edit: just saw your signature Big smile
Am I the only one in this thread who doesn't have a library to shamelessly plug Lol
And a quick shoutout to Steve Ronuken - the fuzzwork sqlite dump is a joy to work with! I use them to export the different tables I need to a variety of formats and use it directly in a few projects. Do you happen to know anything about this other post of mine from today: https://forums.eveonline.com/default.aspx?g=posts&t=394871 ?
Ortho Loess
Escalated.
OnlyFleets.
#6 - 2014-12-31 13:18:45 UTC
I tend to find that the most helpful thing about ml API libraries is that they handle caching for you transparently.

Just pulling the XML and extracting what you want is easy enough, but reimplementing the cache every time is a bit of a ball ache.

Peter Powers
Terrorists of Dimensions
#7 - 2015-01-03 17:24:55 UTC
Martin T wrote:
I think both the XML API and CREST are easy enough to work with at a low level that reinventing the wheel doesn't cost you that much more time.

most people who said that don't care about the cache.


Martin T wrote:
Also don't forget that if you're using another library for the functional part and only need the Eve APIs to feed it data, mashing the two together and making sure they play along nicely can be more frustrating than just doing it yourself.
Last time I tried using a "3rd party library" (an api launched by devs, wrapped by another dev, so a 3rd dev could use it...) I had to struggle with the lack of documentation and the calls I needed it for turned out to be outdated and crashed due to changes in the schema.

If the libraries are developed my modern standards, use namespace and are written properly they should be working well together - if they don't fulfill those basic requirements you shouldn't be using them. A library that wraps arround another library is quite often a good sign of stuff being weird.

Martin T wrote:
If you only need a handful of calls (and in the case of CREST there are only a handful of calls - apart from the tournament stats everything's in the SDE) it's faster just to implement them and you get the benefit of not having to wait for someone else to update his code when something changes.

a) no, its not quicker to build it yourself, as you have to take care of caching, the api-key rights etc. Oh, you are not doing that? well have fun ending up getting limited or banned once you start hitting the API too much, creating all kinds of errors.

b) phealng is build in a way that if the API changes, then the API changes, but the library does not need changes (except if CCP would change the way the api itself works, which they havent since the api exists and won't since they would add it to Crest right away)

c) dragonaires lib last time i checked, was written well enough so that when the API changes, then well the worst that usually would happen, it would need a day or two till the new stuff is added. hint - its opensource, you don't have to wait (with either of the two libs), you can add it yourself and be the hero of the community.

3rdPartyEve.net - your catalogue for 3rd party applications

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#8 - 2015-01-03 18:00:21 UTC
Martin T wrote:
And a quick shoutout to Steve Ronuken - the fuzzwork sqlite dump is a joy to work with! I use them to export the different tables I need to a variety of formats and use it directly in a few projects. Do you happen to know anything about this other post of mine from today: https://forums.eveonline.com/default.aspx?g=posts&t=394871 ?



Oops missed this.

unfortunately, my answer is vOv

Not something I've run into.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

CCP FoxFour
C C P
C C P Alliance
#9 - 2015-01-05 10:23:39 UTC
Peter Powers wrote:
Martin T wrote:
I think both the XML API and CREST are easy enough to work with at a low level that reinventing the wheel doesn't cost you that much more time.

most people who said that don't care about the cache.


PLEEEEEEEEEEEEASE care about this!

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.