From EVEDev
Revision as of 11:17, 24 November 2010 by Neths (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Api.pngAPI Resources - Category Home - API Libraries - API Usage Examples - API Method Reference
Maintainer: Krauser "Krauser"
Stable release: Since Build 2008-02-06
Development release: Active / Stable
OS: Windows 2000 and above, Mac OS, Linux
License: Freeware
Website: http://wiki.eve-id.net/EVE_API_RBSocket


EVE API HTTP Socket Class for REALbasic 2007 Standard and above

This is a basic HTTP Socket Class for REALbasic (http://www.realsoftware.com/), which should help new REALbasic developers start working with the API.


Latest Changes:

  • 2008-01-28:
    • Added first implementation of API Caching Methods
  • 2008-01-29:
    • Fixed some major Caching Database Issues...
  • 2008-01-30:
    • Removed CSV URLs. CSV Data Processing is not reliable, because Fields can contain ","
    • Caching is now always active. But needs some more tuning...
  • 2008-01-31:
    • Missing XML Header will now added automatically when needed
    • Added a Boolean to signalise if the APIData has been taken from Cache or if its live Data
  • 2008-02-02:
    • Added automatic HTTP Proxy configuration
  • 2008-02-03
    • Automatic HTTP Proxy configuration will from now on, only be done, if there has no manually Proxy configuration been done before
    • Moved MSG_ Constants to Prperties. Messages can now be personalised
  • 2008-02-04
    • Updated Cache Expiration Function, to be more reliable
  • 2008-02-06
    • Fixed Address for Corporation Wallet Journal
  • 2008-02-11
    • URL_ChatKillLogXML changed to URL_CharKillLogXML
    • URL_MemMemberTrackingXML changed to URL_CorpMemberTrackingXML
  • 2008-02-14
    • Implementation of Character Name to Character ID and Character ID to Character Name conversion Functions


The EVE API HTTP Socket Class provides easy access to the EVE Online API. You simply have to tell the Socket Basic Infomration, like the UserID, CharacterID, API Key or AccountID. Then you invoke the AccessAPI Function with the needed API URL, which are offered as Constants of the API. Wait until the DownloadInProgree Boolean becomes FALSE and Process the APIData String, which contains the API Content.

The Socket will automatically handle the Caching, so that you do not need to take care about this. For this, the Socket will create a local SQL Database which contains the latest API Content for each UserID and CharacterID.

Some more features are:

  • Let the Socket automatically inform your Users about Data which has been taken from Cache
  • Automatically add a valid XML 1.0 First Line to the XML API Content, to process it with the XML Framework of the REALbasic IDE


This example demonstrates a basic call to the API which returns the EVE Corporation Wallet Journal.

  // Setup the API Post Information
  APISocket.CharID = efCharID.Text //CharacterID
  APISocket.UserID = efUserID.Text //UserID
  APISocket.FullAPIKey = efAPIKey.Text //Full API Key
  APISocket.LimitedAPIKey = efAPIKey.Text //Limited API Key
  APISocket.AutoCachingMessages = True //Socket will now bring up a message box, each time it reads data from the Cache
  // POST the API Form to the appropriate EVE API Page
  APISocket.AccessAPI(APISocket.URL_CorpJournalXML) // Download the Corporation Wallet Journal.
  // Now we have to wait until the EVE API responded...
  Loop Until APISocket.DownloadInProgress = False
  // Process received Data, depending uppon we received an error from the EVE API, or not
  If APISocket.APIError = "" And APISocket.APIData <> "" Then
     //APIError String is empty
    // Process the APISocket.APIData. This contains original API Content
     //APIError String contains an error message
    MsgBox APISocket.APIError
  End If
  // Thats it :-)


If you use this class no crediting is required but feel free to do so (to Krauser "Krauser" Schneppi-Soft, http://www.schneppi-soft.de/). ISK donations are also much appreciated. This code is Freeware licensed- the license is available within the Class.

Personal tools