EveAI
From EVEDev
| EveAI | |
|---|---|
| |
| EveAI Logo | |
| Maintainer: | Amida Ta |
| Stable release: | 1.3.1 |
| Development release: | 1.3.1 |
| OS: | Independent (.NET/Mono API) |
| License: | Common-Use |
| Website: | Eve Forums |
Contents |
[edit] Project Description
EveAI consists of several .Net/CLI 2.0 Libraries that can be used for development for Eve Online.
The main parts of EveAI are:
- EveAI.Live provides full access to the Eve.API v2 as supplied by CCP
- EveAI.Core contains an object-oriented view of static EVE data
EveAI is completely self-contained and does not need any database or other libraries except the .NET/Mono framework. EveAI is completely platform independent and has been tested on Windows/.Net and various flavors of Linux using Mono.
[edit] Releases
[edit] EveAI.Live 1.3
- Test Application
- Allows testing most of the API
- Simple interface
- EveAI.Live class library
- Easy-to-use interface to the Eve API real-time data retrieval mechanism
- Automatic reference resolution even across other live API calls
- Only needs one line of code to set up
- Alternative complex interface for more demanding needs (e.g. multiple asynchronous calls)
- Override caching or implement your own
- Structured object-oriented design that is easily expanded for new APIs
- Structured object-oriented objects that can be used in any application
- Support for all published API v2 accessors
- Full automatic support for caching requirements
- Support for timezone-compensation
- Runs with minimum security (User/Vista)
- Easy-to-use interface to the Eve API real-time data retrieval mechanism
- EveAI.Core class library
- Fully self-contained static Eve Data
- Does not require *any* database or other components
- Used to supply static data to EveAI.Live
[edit] Downloads
- Current Release
- Complete static Eve-Online data
- Complete static Eve-Online data Tyrannis 1.0.1
- Note: EveAI already contains the most important parts of the static Eve-Online data, so there is no need for the complete data to use EveAI. However some data is not included by default:
- Moons/asteriod fields
- Celestial statistics
- Note: EveAI already contains the most important parts of the static Eve-Online data, so there is no need for the complete data to use EveAI. However some data is not included by default:
[edit] Simple mode API usage
There are two possible ways to use EveAI.Live: simple or advanced mode. It is recommended to start with the simple mode API as it is suited for most use-cases.
All functions of the simple-mode API are called through the EveApi Class:
using EveAI.Live; EveApi api = new EveApi ();
You can also pass all credential parameters to the constructor (EveAI.Live will use only the ones that are needed):
EveApi api = new EveApi (UserID, ApiKey, CharacterID); EveApi api = new EveApi (99999, "dsfiosdfsd76sd89f68ds", 99999);
You can then call any of the GetXXX methods to call an Eve Api. Example:
List<Alliance> alliances = api.GetAllianceData ();
The following methods are available through both the simple mode and expert mode APIs:
- api.GetWalletTransferTypes ();
- api.GetAllianceData ();
- api.GetCertificateTree();
- api.GetErrorList ();
- api.GetSkillTree ();
- api.GetMapSovereigntyEntries ();
- api.GetMapJumpEntries ();
- api.GetMapKillEntries ();
- api.GetMapConquerableStations ();
- api.GetAccountEntries ();
- api.GetCorporationAccountBalance ();
- api.GetCorporationWalletJournal ();
- api.GetCorporationWalletTransactions ();
- api.GetCorporationMemberTracking ();
- api.GetCorporationAssets ();
- api.GetCorporationSheet ();
- api.GetCorporationStarbaseList ();
- api.GetCorporationStarbaseDetail ();
- api.GetCorporationIndustryJobs ();
- api.GetCorporationKillLog ();
- api.GetCorporationMarketOrders ();
- api.GetCorporationMedals();
- api.GetCorporationMemberMedals();
- api.GetCharacterAccountBalance ();
- api.GetCharacterWalletJournal ();
- api.GetCharacterWalletTransactions ();
- api.GetCharacterSkillInTraining ();
- api.GetCharacterSheet ();
- api.GetCharacterAssets ();
- api.GetCharacterIndustryJobs ();
- api.GetCharacterKillLog ();
- api.GetCharacterMarketOrders ();
- api.GetCharacterMedals();
- api.GetFactionalOccupancy ();
- api.GetFactionalTop100 ();
- api.GetFactionalWarStatistics ();
- api.GetSovereigntyStatus ();
- api.GetCharacterMailMessages ();
- api.GetCharacterNotifications ();
- api.GetCharacterMailingLists ();
- api.GetCharacterResearch ();
Other APIs available:
- CharacterIDLookup
- CharacterNameLookup
- CharacterImage
Market APIs available:
- Retrieving market data from EVE Central
- Retrieving market data from EVE Metrics
[edit] Code sample for reading the character sheet
This is a C# code sample to read some of the data from a character:
using EveAI.Live; using EveAI.Live.Character; class Sample { static void Main () { EveApi api = new EveApi (99999, "dsfiosdfsd76sd89f68ds", 99999); CharacterSheet charSheet = api.GetCharacterSheet (); Console.WriteLine ("Character " + charSheet.Name + " has " + charSheet.SkillpointTotal + " skillpoints"); Console.WriteLine ("Skills:"); foreach (CharacterSheet.LearnedSkill skill in charSheet.Skills) Console.WriteLine (skill); } }
[edit] Advanced mode API usage
It is recommended to only use the advanced mode if simple mode is not sufficient. In advanced mode each API call is done manually. Static and dynamic data that is not part of a single API call is not automatically added or updated. The advantage of the complex/advanced API is that it allows more control of what happens. Each API object has properties to control cache mechanisms (memory cache/file cache/no cache), update mechanisms (load from disk, update from online, ...) and much more.
[edit] Code sample for reading the character sheet
This is a C# code sample to read some of the data from a character:
using EveAI.Live; using EveAI.Live.Character; class Sample { static void Main () { AuthenticationData auth = new AuthenticationData (); auth.UserID = 99999; auth.ApiKey = "dshoiashdoasdho"; auth.CharacterID = 99999; CharacterSheetApi api = new CharacterSheetApi (); api.AuthenticationData = auth; api.UpdateData (UpdateCharaceristics.Default); CharacterSheet charSheet = api.Data // From here on it's the same as simple mode Console.WriteLine ("Character " + charSheet.Name + " has " + charSheet.SkillpointTotal + " skillpoints"); Console.WriteLine ("Skills:"); foreach (CharacterSheet.LearnedSkill skill in charSheet.Skills) Console.WriteLine (skill); // In advanced mode this will, by default, not write the skill name // as it is not part of the data retrieved from the EVE Api. } }
[edit] Notes
EveAI.Live uses an automatic caching system that conforms to CCP's caching requests by default. The default location for the cache is:
\AppData\Local\EveAI\Cache (General) That translates to: \Users\<Username>\AppData\Local\EveAI\Cache (Windows Vista/7) \Documents and Settings\<Username>\Local Settings (Windows XP) XDG_DATA_HOME if set, ".local/share" otherwise (Linux, Mono)
[edit] Screenshots
[edit] External Links
[edit] VB.Net Code Samples
[edit] Fill TreeView with MarketGroups
- Create a new VB.Net Windows Forms App and rename Form1.vb to MyForm.vb
- Link EveAI.Core and EveAI.Live
- Place a TreeView Control on the Form and rename it to MyTreeView
- Copy/Paste Code and run your App
Imports EveAI Imports EveAI.Live Public Class MyForm 'Create an Instance of EveAI.Live.EveApi Private MyApi As New EveApi Private Sub MyForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Clear all Nodes in the TreeView MyTreeView.Nodes.Clear() 'Loop all MarketGroups in MyApi For Each element As Product.MarketGroup In MyApi.EveApiCore.MarketGroups 'Check if element has no ParentGroup If IsNothing(element.ParentGroup) Then 'Element is Top Level Market Group 'Create an Instance of TreeNode for Recursive Call and write MarketGroup.Name as Node to TreeView Dim node As TreeNode = MyTreeView.Nodes.Add(element.Name) 'Call Recursive Sub ProductMarketGroup_AddNodeRecursive(element, node) End If Next End Sub Private Sub ProductMarketGroup_AddNodeRecursive(ByVal ParentMarketGroup As Product.MarketGroup, ByVal ParentNode As TreeNode) 'Loop all Children MarketGroups in ParentMarketGroup For Each element As Product.MarketGroup In MyApi.EveApiCore.GetMarketGroupChildren(ParentMarketGroup) 'Create an Instance of TreeNode for Recursive Call and write MarketGroup.Name as SubNode to TreeView Dim node As TreeNode = ParentNode.Nodes.Add(element.Name) 'Call Recursive ProductMarketGroup_AddNodeRecursive(element, node) Next End Sub End Class




