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.
Previous page12
 

EVE.Net Library

Author
Virppi Jouhinen
Xiphias Ltd.
#21 - 2012-08-19 23:25:09 UTC  |  Edited by: Virppi Jouhinen
So I'm currently porting and I've run into two problems:

1. I'd like to initialize the API/Library beforehand as the first call takes quite long and I can spare the time during startup but would like the first experience of the users rather not to be to wait a few seconds. What would be the easiest way to do this?

2. The CharacterSheet.Query() method crashes for one of my chars because one roleID exceeds the int limit in ParseRowset(parent, property, xml); It's easily fixed by making the roleID property long instead of int.
Cuhlen
Deep Core Mining Inc.
Caldari State
#22 - 2012-08-20 19:18:05 UTC
Virppi Jouhinen wrote:
So I'm currently porting and I've run into two problems:

1. I'd like to initialize the API/Library beforehand as the first call takes quite long and I can spare the time during startup but would like the first experience of the users rather not to be to wait a few seconds. What would be the easiest way to do this?

2. The CharacterSheet.Query() method crashes for one of my chars because one roleID exceeds the int limit in ParseRowset(parent, property, xml); It's easily fixed by making the roleID property long instead of int.


Well, I'm not sure why the first call takes so long for you, but one idea would be to use a background worker to make a call to the API status page (which requires no API key data), something like;

// PSEUDO CODE ALERT---
BackgroundWorker worker = new BackgroundWorker();

worker.DoWork += delegate(object sender, DoWorkEventArgs e)
{
EVE.Net.ServerStatus status = new EVE.Net.ServerStatus();
status.Query();
};

worker.RunWorkerAsync();

Sorry about the roleID, the API wiki is --vague-- on which IDs should be ints and which longs. Thanks for the report though, I'll get that updated in the
Virppi Jouhinen
Xiphias Ltd.
#23 - 2012-08-20 19:24:23 UTC
Cuhlen wrote:

Well, I'm not sure why the first call takes so long for you, but one idea would be to use a background worker to make a call to the API status page (which requires no API key data), something like;

// PSEUDO CODE ALERT---
BackgroundWorker worker = new BackgroundWorker();

worker.DoWork += delegate(object sender, DoWorkEventArgs e)
{
EVE.Net.ServerStatus status = new EVE.Net.ServerStatus();
status.Query();
};

worker.RunWorkerAsync();

Sorry about the roleID, the API wiki is --vague-- on which IDs should be ints and which longs. Thanks for the report though, I'll get that updated in the


Running a BackgroundWorker on startup checking for Server Status is exactly what I did in my release. I've ported Elinor now and am quite pleased at the speed and size of your lib, keep up the good work.
Fiat Money
EVE Sky Corp
#24 - 2012-08-22 19:28:40 UTC
First of all good work, mate!

The API is pretty light weight compared to others. That's a big PLUS!
On the other hand what I'm missing is some data acces to item prices.

Are you planning to extend your API to cover EVE central and EVE Marketeer calls? Both are crucial for NAV investigation and price history analysis.

Implementing both would be truly incredible!
Osku Rei
Pixel 6
#25 - 2012-08-22 21:35:51 UTC
Cuhlen wrote:
[quote=Virppi Jouhinen]Looks very interesting, might switch Elinor to your lib.

I just don't like using libraries that I don't have the source to.



You don't need the source when using a good library Blink

'good' has some tight pre-requisites from my POV though Cool

Next generation of lottery tracker coming soon! http://evelotterytracker.com/

Please like my post if it has helped you :)

ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#26 - 2012-08-23 00:13:49 UTC
You, sir, are a gentleman and a scholar.

However, there is one little bug I'd like to report; it seems to mess up when importing implants.
In a nutshell, it takes the first one and thinks all the others are the same.
I've written a bit of a bug report on your google code repository, hopefully you can somehow understand my jibbering.
Cuhlen
Deep Core Mining Inc.
Caldari State
#27 - 2012-08-23 19:08:59 UTC
Fiat Money wrote:
First of all good work, mate!

The API is pretty light weight compared to others. That's a big PLUS!
On the other hand what I'm missing is some data acces to item prices.

Are you planning to extend your API to cover EVE central and EVE Marketeer calls? Both are crucial for NAV investigation and price history analysis.

Implementing both would be truly incredible!


Honestly, I had not considered it. This is something that I will give serious consideration to.

I am planning/working on a data layer to the API which would ship as a separate module/project. A market lookup tool might fit into that, or possible even it's own separate piece.
Cuhlen
Deep Core Mining Inc.
Caldari State
#28 - 2012-08-23 23:42:30 UTC
ItsmeHcK1 wrote:
You, sir, are a gentleman and a scholar.

However, there is one little bug I'd like to report; it seems to mess up when importing implants.
In a nutshell, it takes the first one and thinks all the others are the same.
I've written a bit of a bug report on your google code repository, hopefully you can somehow understand my jibbering.


Yikes - nasty little bugger.

I have checked in a tentative fix, but before I put together a new version package I was hoping to get some additional testing on this. If you can download the one changed file 'APIReader.cs' and make sure I've not broken anything else... I would appreciate it. (I have tested 20 some api calls, and all seems good, but an extra set of eyes is always nice).

Thanks for the bug report!
ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#29 - 2012-08-24 09:49:35 UTC  |  Edited by: ItsmeHcK1
Will do a check as soon as I can. ^^
Thanks in advance!

Edit: Seems to be fixed indeed.

Ninja-edit:
The accessmask in APIKeyInfo can no longer be an int, as CCP have just added another flag, making it larger than an int can handle. (check the API key generator thingy, a flag for Locations has just been added, bringing the total to 268435455)
Cuhlen
Deep Core Mining Inc.
Caldari State
#30 - 2012-08-24 16:49:37 UTC
ItsmeHcK1 wrote:

Ninja-edit:
The accessmask in APIKeyInfo can no longer be an int, as CCP have just added another flag, making it larger than an int can handle. (check the API key generator thingy, a flag for Locations has just been added, bringing the total to 268435455)


Good call.

Source updated, thanks.
Fiat Money
EVE Sky Corp
#31 - 2012-08-27 21:21:17 UTC
Hi,

I'm about to combine different API classes, such as the Alliance class with the CharacterSheet and noticed you are using different datatypes for allianceID. The CharacterSheet class provides UInt64, but the Alliance itself Int64. Datatypes shall be standardized to ease comparison by Id.
Fiat Money
EVE Sky Corp
#32 - 2012-08-28 20:34:02 UTC  |  Edited by: Fiat Money
Another thing.

Found a bug with the CorporationSheet that is not loading at all. Loading from API results into "Illegal page request", but I have all priviliges set. I've tried with your EVE.Net client.

Update:

Your Corporationclasses are using characterID instead of the used corporationID:
reader.Query(Uri, this, "keyID={0}&vCode={1}&corporationID={2}", keyID, vCode, actorID);

Changing it to corporationID brings back a valid Response, but the APIReader is throwing a targetinvocationException:

if (!string.Equals(cacheFile, address))
SaveCacheFile(nav);
Desmont McCallock
#33 - 2012-08-28 20:40:34 UTC  |  Edited by: Desmont McCallock
ItsmeHcK1 wrote:
Ninja-edit:
The accessmask in APIKeyInfo can no longer be an int, as CCP have just added another flag, making it larger than an int can handle. (check the API key generator thingy, a flag for Locations has just been added, bringing the total to 268435455)
Locations API call has been added a long time ago from CCP PrismX. Just FYI.
Edit: It's advised to check with http://wiki.eve-id.net/APIv2_Page_Index
Edit 2: Still 268,435,455 is less than a 32bit int can handle. FYI max value of 32bit int is 2,147,483,647
ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#34 - 2012-09-04 21:48:08 UTC  |  Edited by: ItsmeHcK1
Hmm, good point...
Well, Visual Studio threw an error saying it was too big, so... vOv
I was too lazy to check. :P

Anyhoo, here's another one...
For the CharacterInfo API, the keyid and vcode are optional, but there is no constructor that only asks for the character id, nor a query override that deals with that.

I simply changed the Query override into this:
if (String.IsNullOrEmpty(keyID))
reader.Query(Uri, this, "characterID={0}", actorID);

And added a constructor:
public CharacterInfo(string actorid)
: base("", "", actorid) { }
ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#35 - 2012-09-06 14:33:27 UTC
Same goes for the corporationsheet one; an API key is not required, but the class is not set up for that eventuality.
ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#36 - 2012-10-10 15:14:55 UTC
Are you still actively developing on this? Or do you consider it completed?

Trying to decide whether I should modify it a bit. :P (error handling, for example)
Fenian
Ancient Artifacts
#37 - 2012-10-18 11:53:40 UTC
I notice in this code you dont handle CorpwalletsJournals Correct. I have no way to pass what WalletID i want to get results back for. You put it in with the Chracter Wallet journal and thats fine but thing you could fix it up to handle the corp wallet it.
Previous page12