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.
 

Requests from api data server - can someone confirm this?

Author
Drintu Lero
Doomheim
#1 - 2011-12-30 21:55:51 UTC  |  Edited by: Drintu Lero
Ok, I'm working on an eve app and I have a couple of question.

1. The api has different urls with parameter requirements to retrieve character, corp and etc. data. When developing an app, does our app need to make each http request to get all the data? or is there a single request we can make to get all data. Right now I use the xml facilities of the language I am using to parse each http request for every api item. That's alot of requests at the startup of the program, and I want to make sure I don't violate any rules that will block a user of my program? Please confirm for me if I am doing this the correct way.

2. To elaborate the first question. I use the xml facilites of my programming language to parse each individual returned xml element. I apoligize for a beginner programming question, but is this the correct way to do things? There are some advanced apis out there for different languages that simplify everything. Is it pretty much what they do? parse the xml data in the background to simplify it for others, wrapping them into functions? or is there some more in depth accessibility to the api that I am not aware of? For example the .NET api at http://eve-id.net
Xander Hunt
#2 - 2011-12-31 00:04:09 UTC  |  Edited by: Xander Hunt
#1 - Correct and only way. There is no "universal api" call that'll call every API and mix it into one XML file. Anything I've written hits the API servers once rather hard (In serial, not parallel) to get the data I need, but then I don't touch it for something like 6 hours. Never heard a word from CCP about it.

Edit: But then again I'm not pulling a TONNE of data like some websites out there, like killboards.

#2 - There are a few "Actively developed" tools out there for pretty much any popular language of the day. Myself, I'm writing some Delphi routines for desktop applications, and storing the result set in a SQLite database for both caching and speed.

I've also investigated YAPEAL and although well written, not used as my primary source at the moment. Most of my reasoning behind that is I'm still trying to translate the database itself. YAPEAL is not a framework for PHP, CGI, Delphi, ASP, or anything of the sort, actually. Its written to download whatever necessary API data from CCP and then convert the XML into a database format for you. You then do your code to lookup database information instead of worrying about whether the data is up to date, convert from XML to something else, etc.

For the PHP pages that I've written for my corps use, I've used someone elses code (I'll have to look it up when I'm more awake) that takes the XML code and converts it into multi-dimentional arrays. You basically create the XML translator object, tell it to read the XML file (Either via HTTP or file on the local machine) and it'll do the work for you. You then access your data via a mechanism like $Account['result']['key']['rowset']['row']['characterID'] or of some format like that.