These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

EveAI Live (EVE-Online API/class library for .Net/ C#/ VB.Net)

Author
Kronus Heilgar
Science and Trade Institute
Caldari State
#101 - 2012-04-27 21:22:57 UTC
Jognu wrote:

I'll look if I can do something for this, but it may be difficult because the cache files are not based on the vcode.



Would it be possible to just have a function that forces the cache for that API to clear? Then I just call the cache-clear function before every APIKeyInfo call.

This is not the signature you're looking for.

Jognu
French Kiss Singularity
#102 - 2012-05-02 12:19:07 UTC
You can ignore the cache but you need to use the advanced mod of the API.
Example : http://pastebin.com/ycA0Wv3J

Marbin Drakon > your code works for me, check that you have the last release.

Lokty (and others) : I didn't notice that there was already a method to change the cache folder.
So please use the EveApiBase.Configuration.BaseDirectory parameter to define it, I'll remove the .config file on the next release.

EveAI developper: https://forums.eveonline.com/default.aspx?g=posts&t=21803

Marcus Sworaven
Falcon Regiment
#103 - 2012-05-05 13:57:29 UTC  |  Edited by: Marcus Sworaven
CaptainThorVonAwesome wrote:
Marcus Sworaven wrote:
I'm trying to extract transactions for each wallet from my corp. I'm using this for loop:
Quote:
For i As Integer = 0 To 6
CorpWalletTransactions(i) = apiCorp.GetCorporationWalletTransactions(1000 + i)
Next


CorpWalletTransactions is declared as follows:
Quote:
Public CorpWalletTransactions(6) As List(Of EveAI.Live.TransactionEntry)

CorpWalletTransactions(6) = New List(Of EveAI.Live.TransactionEntry)


When I extract the first wallet (the master wallet) it shows 0 transactions. Which is correct. Then I extract the second wallet, which shows a number of transactions, also correct. But when I extract the remaining wallets (which should be empty) I get the transactions identical to the second wallet.

I get the same result when I declare the wallets separately.

Am I missing something? Am I doing something wrong?


Marcus,

In playing around with the API I have run into the same problem, however I discovered that a declared API call can have an accountKey hard coded into the constructor. So what I did was declared one EveAPI without a accountKey to fetch a list of accounts, and then looped through the accounts using a second EveAPI object to fetch the data. Like so...:

Dim eveAPI As New EveAI.Live.EveApi(keyID, vCode, characterID, 1000)
Dim eveAccounts As List(Of EveAI.Live.AccountBalance) = eveAPI.GetCorporationAccountBalance

For i As Integer = 0 To eveAccounts.Count - 1
Dim iAccountKey As Integer = eveAccounts.Item(i).AccountKey
Dim eveAPI_Wallets As New EveAI.Live.EveApi(keyID, _
vCode, _
characterID, _
iAccountKey)

Dim eveJournal As List(Of EveAI.Live.JournalEntry) = eveAPI_Wallets.GetCorporationWalletJournal()
Dim eveTransactions As List(Of EveAI.Live.TransactionEntry) = eveAPI_Wallets.GetCorporationWalletTransactions()


iAccountKey = Nothing

eveJournal = Nothing
eveTransactions = Nothing

eveAPI_Wallets = Nothing
Next i

Thanks, that helped. It's working now!

CaptainThorVonAwesome wrote:

However the one thing that I have been able to determine is that the GetCorporationWalletJournal() function returns the default number of rows from CCP's API call, 50 rows, and there seems to be no way to itterate through the data sets to collect more rows. CCP has to options, one is FromID and the other is rowCount. RowCount by default is 50, but can go up to 2,560, since I am ever only getting 50 rows back I'd be willing to guess this value is not being passed. Also, the FromID sets the row at which the pulls starts going back in time from. So if you have 2565 rows in total, you could set it at the 2,560th row and get that plus the remaining 5 rows.

With that, I'd like to either suggest or offer up my assistance in modifying the GetCorporationWalletJournal() and GetCorporationWalletTransactions() functions to accept the "fromID" and the "rowCount" values that CCP accepts and input parameters to the API.



Has this been implemented?

Edit: Nvm, I'm using the advanced version instead to do this :)
Maasu
Project Manhattan
#104 - 2012-05-05 19:18:36 UTC  |  Edited by: Maasu
One question, when using GetCorporationAssets, shouldn't this return all corp assets? It's not for some bizzare reason, but only particular ones in a certain hangar.

Nm figured it out, getCorporationassets returns a list of asset locations, each containing a collection named Contents and thats where u access the items.

eg/ GetCorporationAssets(0).Contents(0)

ex member of Curse Alliance, The Five, Fatal Alliance.

Miilla
Hulkageddon Orphanage
#105 - 2012-05-05 19:19:28 UTC
Why not just make it COM Visible then we can use it in any COM aware language?
Marcus Sworaven
Falcon Regiment
#106 - 2012-05-20 15:01:45 UTC
I'm having a little trouble with the GetIdForObject() function.

Quote:
MapData = New EveAI.DataCore
DataReader = New EveAI.StaticDataDataReader(MapData)
DataReader.Read(EveAI.DataTypes.BasicMapData)
Dim Id As Integer = MapData.GetIdForObject(SolarSystem)


I always get a returnvalue of -1 even though 'SolarSystem' isn't empty/nothing.

I'm also having a bit of trouble with the StaticDataDataReader. I can't seem to read everything (DataReader.Read(EveAI.DataTypes.All). It keeps giving me this error:
Quote:
EveAI data file could be located neither embedded nor externally: mapDenormalize.csv
Jognu
French Kiss Singularity
#107 - 2012-05-24 09:09:04 UTC
I'll check that and prepare an update with the news statics data.

EveAI developper: https://forums.eveonline.com/default.aspx?g=posts&t=21803

Jognu
French Kiss Singularity
#108 - 2012-05-29 14:22:08 UTC
New release !

Quote:
Version 2.5.0.0

  • New static data (Inferno_1.0_70633)
  • Fix GetIdForObject always return -1
  • Remove App.config for the cache folder, use EveApiBase.Configuration.BaseDirectory
  • The two assemblies are now COM Visible
  • Add the queuePosition information for the CharacterSkillQueueApi
  • Add the null value for queuePosition in the SkillInTrainingApi

EveAI developper: https://forums.eveonline.com/default.aspx?g=posts&t=21803

Dread Slurr
Native Freshfood
Minmatar Republic
#109 - 2012-07-15 21:13:51 UTC
Is there any chance of getting this library compiled for WP7?
Jognu
French Kiss Singularity
#110 - 2012-07-17 16:48:47 UTC
Dread Slurr wrote:
Is there any chance of getting this library compiled for WP7?

I'll check if it's possible and keep you informed.

EveAI developper: https://forums.eveonline.com/default.aspx?g=posts&t=21803

Lisa Pleiades
Pleiadian Trading
Post Nord
#111 - 2012-08-03 16:24:53 UTC
I've checked out the api thing but i quite haven't figured out how to retrieve market info of a product from the EVE Central thing.

You got any documentation how to use the EVEAi Market or examples? With examples i mean fetching all products market info.
Virppi Jouhinen
Xiphias Ltd.
#112 - 2012-08-09 21:07:31 UTC
Lisa Pleiades wrote:
I've checked out the api thing but i quite haven't figured out how to retrieve market info of a product from the EVE Central thing.

You got any documentation how to use the EVEAi Market or examples? With examples i mean fetching all products market info.


That's how I do it: http://pastebin.com/VgXVjsk0
Marlyrel
Federal Navy Academy
Gallente Federation
#113 - 2012-08-13 18:36:33 UTC
Hi all!
I'm trying to make a little program that calculates the yield of some crafting operation in our Corp.
For that I need to access the CorpWallet.

I checked the other posts concerning that topic but all I get is empty lists.

here's my attempt:
http://pastebin.com/m5wFTm6E

As you can see in the comments, some parts of the code actually return correct information. Just the GetCorporationWalletJournal() and Transactions refuse to work.

Help would be most appreciated.

Thanks in advance!
Scarly Memore
Legion Of Patriots
#114 - 2012-08-13 23:23:44 UTC
Hello Sorry to bump an old thread but im messing around with EveAi to learn some C#.

So far ive got an app with 2 textboxes for Vcode and KeyID, a list box and a button.

I input my Keys into the relevant field and press the button which queries ApiKeyInfo to get characters and populates characters into the list box (basically jognu test app in post #65).

Can i use the list box to get other character info based on the selected character in the listbox? If so can i be given an example to work from?

Thanks
Marlyrel
Federal Navy Academy
Gallente Federation
#115 - 2012-08-14 09:56:27 UTC
Scarly Memore wrote:
Hello Sorry to bump an old thread but im messing around with EveAi to learn some C#.

So far ive got an app with 2 textboxes for Vcode and KeyID, a list box and a button.

I input my Keys into the relevant field and press the button which queries ApiKeyInfo to get characters and populates characters into the list box (basically jognu test app in post #65).

Can i use the list box to get other character info based on the selected character in the listbox? If so can i be given an example to work from?

Thanks


Add an eventlistener to the listbox. Something about onSelectedIndexChanged. So when the user selects something else you can refresh the output window. using the information you get from the list.

Is that what you wanted to know? =)
Scarly Memore
Legion Of Patriots
#116 - 2012-08-14 20:47:21 UTC  |  Edited by: Scarly Memore
The list only shows my character name, so i dont understand how i can use my name if i cant see my CharID. I was hopint to use something along the lines of:

Var SelChar = Listbox1.SelectedItem

TextBox.Text = SelChar.CharacterID

etc

Can i have permission to add someone as a contact ingame for some help?

this is the code im using for the ListBox:

APIKeyInfo apikeyinfo = api.getApiKeyInfo();
LB_CharList.DataSource = apikeyinfo.Characters;
Scarly Memore
Legion Of Patriots
#117 - 2012-08-14 23:11:06 UTC
Jognu so kind and helped me.

Code solution:

AccountEntry selectedAccount = (AccountEntry)LB_CharList.SelectedItem;
TB_CharID.Text = selectedAccount.CharacterID.ToString();
Jognu
French Kiss Singularity
#118 - 2012-08-14 23:16:16 UTC
Marlyrel wrote:
Hi all!
I'm trying to make a little program that calculates the yield of some crafting operation in our Corp.
For that I need to access the CorpWallet.

I checked the other posts concerning that topic but all I get is empty lists.

here's my attempt:
http://pastebin.com/m5wFTm6E

As you can see in the comments, some parts of the code actually return correct information. Just the GetCorporationWalletJournal() and Transactions refuse to work.

Help would be most appreciated.

Thanks in advance!

Your code seems good, I use the same kind and it works for me.
Are you sure that your API key have the good rights ?

I'll post an update with the Inferno 1.2 static data and a beta parser for EMDR tomorrow if everything works fine.

I try to make it works for WP7, but EveAI use a couple of librairies not avaible in WP7, so I am not sure that it will work.

EveAI developper: https://forums.eveonline.com/default.aspx?g=posts&t=21803

Marlyrel
Federal Navy Academy
Gallente Federation
#119 - 2012-08-15 08:29:16 UTC  |  Edited by: Marlyrel
Jognu wrote:
Marlyrel wrote:
Hi all!
I'm trying to make a little program that calculates the yield of some crafting operation in our Corp.
For that I need to access the CorpWallet.

I checked the other posts concerning that topic but all I get is empty lists.

here's my attempt:
http://pastebin.com/m5wFTm6E

As you can see in the comments, some parts of the code actually return correct information. Just the GetCorporationWalletJournal() and Transactions refuse to work.

Help would be most appreciated.

Thanks in advance!

Your code seems good, I use the same kind and it works for me.
Are you sure that your API key have the good rights ?

I'll post an update with the Inferno 1.2 static data and a beta parser for EMDR tomorrow if everything works fine.

I try to make it works for WP7, but EveAI use a couple of librairies not avaible in WP7, so I am not sure that it will work.


I'm using a corp API key and ticked all boxes. Should I be using a personal key?
I also have all rights in the Corp (Director rank or something).
Well I'll try it again later when I'm at home. Thanks for the help!

EDIT: And today it started working without me changing my code =D
Jognu
French Kiss Singularity
#120 - 2012-08-15 17:10:55 UTC
New release !

Quote:
Version 2.6.0.0

  • New static data (Inferno_1.2_76477)
  • Beta parser for EMDR (see below)


Quote:
EVE Market Data Relay (EMDR) is a super scalable, highly available firehose of real-time market data. For those that wish to record price and history data as it comes in, EMDR will help you do so as efficiently and reliably as possible. EMDR’s data feed is open to the public, and is developed as an open source project.


You have a sample source code here : http://www.eve-emdr.com/en/latest/using.html#c

With this sample code and EveAI you can use :
EMDRData newMarketData = new EMDRData(dictionary);

Where "dictionary" is the "dictionary" variable of the sample code.

The EMDRData class will then give you an object with all the informations return by EMDR.

EveAI developper: https://forums.eveonline.com/default.aspx?g=posts&t=21803