EVE API RBSocket
|API Resources - Category Home - API Libraries - API Usage Examples - API Method Reference|
|EVE API RBSocket|
|Stable release:||Since Build 2008-02-06|
|Development release:||Active / Stable|
|OS:||Windows 2000 and above, Mac OS, Linux|
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.
- Added first implementation of API Caching Methods
- Fixed some major Caching Database Issues...
- Removed CSV URLs. CSV Data Processing is not reliable, because Fields can contain ","
- Caching is now always active. But needs some more tuning...
- 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
- Added automatic HTTP Proxy configuration
- 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
- Updated Cache Expiration Function, to be more reliable
- Fixed Address for Corporation Wallet Journal
- URL_ChatKillLogXML changed to URL_CharKillLogXML
- URL_MemMemberTrackingXML changed to URL_CorpMemberTrackingXML
- 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... Do App.DoEvents 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 Else //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.