EveAI

From EVEDev
Jump to: navigation, search

EveAI
EveAiLogo.png
EveAI Logo
Maintainer: Amida Ta & Jognu
Stable release: 2.6.6.0
Development release: 2.6.6.0
OS: Independent (.NET/Mono API)
License: Common-Use
Website: Eve Forums

Contents

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.


Releases

EveAI.Live 2.6.6.0

  • 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)
  • 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

Downloads

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 (KeyID, VCode, 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 (this list is not up to date):

  • api.GetApiKeyInfo ();
  • 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.GetCorporationLocations ();
  • api.GetCorporationMemberMedals();
  • api.GetCorporationContracts ();
  • api.GetCorporationContractItems ();
  • api.GetCorporationContractBids();
  • api.GetCorporationContactList ();
  • api.GetCharacterAccountBalance ();
  • api.GetCharacterWalletJournal ();
  • api.GetCharacterWalletTransactions ();
  • api.GetCharacterSkillInTraining ();
  • api.GetCharacterLocations ();
  • api.GetCharacterSheet ();
  • api.GetCharacterAssets ();
  • api.GetCharacterIndustryJobs ();
  • api.GetCharacterKillLog ();
  • api.GetCharacterMarketOrders ();
  • api.GetCharacterMedals();
  • api.GetCharacterMailMessages ();
  • api.GetCharacterMailBodies ();
  • api.GetCharacterNotifications ();
  • api.GetCharacterNotificationsTexts ();
  • api.GetCharacterMailingLists ();
  • api.GetCharacterResearch ();
  • api.GetCharacterContracts ();
  • api.GetCharacterContractItems ();
  • api.GetCharacterContractBids();
  • api.GetCharacterContactList();
  • api.GetCharacterContactNotifications ();
  • api.GetFactionalOccupancy ();
  • api.GetFactionalTop100 ();
  • api.GetFactionalWarStatistics ();
  • api.GetSovereigntyStatus ();

Other APIs available:

  • CharacterIDLookup
  • CharacterNameLookup
  • CharacterImage
  • TypeNameLookupApi

Market APIs available:

  • Retrieving market data from EVE Central

EMDR parser : https://forums.eveonline.com/default.aspx?g=posts&m=1801215#post1801215

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);
  }
}
 

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.

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.
  }
}
 

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)
 

Screenshots

200 Screen123.png

VB.Net Code Samples

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
 
Retrieved from "?title=EveAI&oldid=7135"
Personal tools