Difference between revisions of "EVE API Guide"
(→C#) |
|||
Line 37: | Line 37: | ||
Get [http://wiki.eve-id.net/EveAI#Downloads EveAI.Live] from here | Get [http://wiki.eve-id.net/EveAI#Downloads EveAI.Live] from here | ||
− | === Visual Basic === | + | === Visual Basic.NET === |
+ | |||
+ | Get [http://wiki.eve-id.net/EveAI#Downloads EveAI.Live] from here | ||
== Something A Bit More Complicated == | == Something A Bit More Complicated == |
Revision as of 16:41, 27 May 2011
This is a quick guide to using the EVE API in your own applications, scripts, and utilities.
This is not a guide to programming, setting up and using a webserver, or XML - there are enough of those floating around the internet. You will need to make sure you understand these before reading this guide.
Introduction to the EVE API
The EVE API is basically a set of calls to web pages on a CCP server that allow you to retrieve information from the EVE game servers, most often something related to a character, corporation, the game map, or the game server status.
Using the API, you can query the server from your own program code. This could be a desktop application, a dynamic web page, or even a command-line script.
As the API uses nothing but HTTP calls and XML responses, you can use pretty much any language you like as long as there's a way to return the source of a web page in it. This guide will focus primarily on scripting web pages in PHP, as this tends to be the simplest method and is available to just about anyone with access to some webspace (if you don't have access, you can always install a local copy of Apache and PHP on your desktop computer)
Security
In order to prevent unauthorised access to private character/corporation data, the API uses an API Key. This is a randomly-generated string that essentially works as a password for API calls. Account owners generate their own API keys through this page. That page also informs you of your unique numeric user ID, which is used in API calls instead of your username. This allows a degree of trust with third-party applications, in that they neither need to know your login name or password.
Note that at time of writing, a new API Key system allowing more granular access permissions was in development, and is discussed here.
API Functions
The available API functions are documented at http://wiki.eveonline.com/en/wiki/EVE_API_Functions
You may also find http://wiki.eve-id.net/APIv2_Page_Index to be a useful third-party reference.
Using the API - Simple Examples
PHP
A number of third-party libraries are available for PHP programmers, which will do the bulk of the work for you. For the purposes of these examples, we will be using Ale - make sure you have downloaded this and placed a copy on your webserver.
C#
Get EveAI.Live from here
Visual Basic.NET
Get EveAI.Live from here