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.
123Next pageLast page
 

[EveLib] A .NET library for EveXML, CREST, EveCentral, and more

First post
Author
Icahmura Hasaki
Perkone
Caldari State
#1 - 2014-03-30 15:50:47 UTC  |  Edited by: Icahmura Hasaki
EveLib is a .NET Library for the Eve Online API, CREST and other popular APIs. It is written in C#, is open source and licensed under Apache v2.

EveAuth Utility: A small CLI tool to assist in obtaining access- and refresh tokens for the Eve SSO service.
https://forums.eveonline.com/default.aspx?g=posts&t=480927

All In One: (except DynamicCrest)
https://www.nuget.org/packages/eZet.EveLib

Single Packages:
https://www.nuget.org/packages/eZet.EveLib.DynamicCrest/
https://www.nuget.org/packages/eZet.EveLib.EveAuth/
https://www.nuget.org/packages/eZet.EveLib.EveXml/
https://www.nuget.org/packages/eZet.EveLib.EveCentral/
https://www.nuget.org/packages/eZet.EveLib.EveMarketData/
https://www.nuget.org/packages/eZet.EveLib.Element43/
https://www.nuget.org/packages/eZet.EveLib.ZKillboard/
https://www.nuget.org/packages/eZet.EveLib.EveWho/
https://www.nuget.org/packages/eZet.EveLib.StaticData/
https://www.nuget.org/packages/eZet.EveLib.EveCrest/ [Discontinued]
Wiki: https://github.com/ezet/evelib/wiki
Source: https://github.com/ezet/evelib
Symbols: http://nuget.smbsrc.net/

    Supported APIs
  • Eve Online API
  • Eve Online CREST
  • Eve Central
  • Eve Market Data
  • Element43
  • ZKillboard
  • EveWho
  • Eve Static Data (Element43) [partial]


    Features
  • Fully asynchronous using TAP
  • Thread safe
  • XML configuration through app.config.
  • Access to all popular APIs through one library.
  • Provides caching for CCP API requests.
  • Modular and open source; you can easily change the caching, serialization or any other part of the library.
  • A fairly comprehensive set of unit tests, including static xml samples for calls requiring authentication.


For more information, downloads and examples, visit the Github repository.
You can also contact me on IRC, I'm on Coldfront in the official #eve-dev channel as "eZet".

Release notes:
https://github.com/ezet/evelib/releases

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#2 - 2014-04-02 16:04:28 UTC
I've fixed a few minor bugs and updated the API to the newest version, described here.

The current version is stable and tagged. If anyone wants me to upload the dll files separately, let me know.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#3 - 2014-04-14 15:37:54 UTC
Updated again with some more bugfixes. Added a better way to check if a given key is valid, and implemented support for parts of the api provided by element43. Next on the schedule is a few more of the calls to element43 and then the CREST api.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#4 - 2014-04-19 15:43:32 UTC
Released version 1.2, with much improved error handling, debug output and other fixes, as well as support for element-43.com.
Feel free to ask questions or for help here, or through email. I can normally get things fixed within a few hours.

Developer of EveLib and EveAuthUtility

Jack Mensen
Specter Force Security
#5 - 2014-04-19 16:40:22 UTC  |  Edited by: Jack Mensen
Heya, nice work there! Just took a quick look at your code, did you know that you have to take the current culture settings the program is running under into account when you are parsing numbers? I can't see any use of cultures in your code, but as said, I just skimmed it.

When parsing the security status for example I have to do

var culture = new CultureInfo("en-US");
c.SecurityStatus = float.Parse(cResult.Element("securityStatus").Value, culture);

to parse this correctly: -2.66483930517884

That's because the point is used to group thousands in Germany, the colon marks the decimal part. Just wanted to tell you that, if you are already aware of it never mind me! Big smile

Greetings,
Jack

Edit: Actually you are using CultureInfo.InvariantCulture to parse Decimals, all good! ;)
RO ALEXANDER
EVE-RO
Goonswarm Federation
#6 - 2014-04-20 20:41:38 UTC
Hey! Trying out your code, build your projects and added the resulting dlls as a reference to my current c# solution (a tool I'm making just for me that displays various information and views of my accounts in a format I want) .

Question is: I've seen you're storing hashes of request so that you know if you already made that request and when the cache expires, however I might be mistaken but there are certain data pieces (logs, assets list, journal) that are not stored on Eve's CDN and you only get one chance to get the data. Are you planning on storing that sort of stuff locally somewhere, or should I just add that option myself?
Icahmura Hasaki
Perkone
Caldari State
#7 - 2014-04-28 17:56:43 UTC
Sorry for the late replies, I was sure I had added notifications for this topic, but it doesn't seem to be working.

About parsing decimals, I believe it should be working, but if there are any bugs let me know and I'll fix it asap.

About the caching, every page is cached locally by Windows, assuming you are running that. I'm not entirely sure how it works under other OS, feel free to provide some feedback. So unless you clear the IE cache, the returned data is available there and is used by the library on subsequent requests. The caching part was written very quickly, and isn't very robust. I will implement a custom cache in the near future.

If you however want to write your own, you simply need to implement the IRequestHandler for complete control, or use CachedRequestHandler which already implements IRequestHandler with some default logic for caching.

Again, I'm really sorry for the late replies, I simply haven't checked this for a while assuming I would get notified. Bugs and other requests are normally responded to within a day.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#8 - 2014-05-05 09:23:17 UTC  |  Edited by: Icahmura Hasaki
Updated with much improved cache handling, and various other minor fixes. XML files are stored in /AppData/Roaming/EveLib/Cache by default on windows, or under ~/config/... on most other platforms, though this can be changed with app.config.

Starting work on CREST support, which should be ready shortly.

Developer of EveLib and EveAuthUtility

RO ALEXANDER
EVE-RO
Goonswarm Federation
#9 - 2014-05-05 10:08:52 UTC
Icahmura Hasaki wrote:
Updated with much improved cache handling, and various other minor fixes. XML files are stored in /AppData/Roaming/EveLib/Cache by default on windows, or under ~/config/... on most other platforms, though this can be changed with app.config.

Starting work on CREST support, which should be ready shortly.



Found a bug in the update, app crashes in the Store() function, namely the "File.WriteAllText(Config.CachePath + Path.DirectorySeparatorChar + GetUriHash(uri), data);" line. It's because the directory is not created anywhere in the app, and I assume that when you ran it yourself, you already had that path.

Icahmura Hasaki
Perkone
Caldari State
#10 - 2014-05-05 10:22:17 UTC
Oh, I had that sorted at some point, but seems it didn't make it to the sync. It's fixed now. Let me know if there is anything else Bear

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#11 - 2014-05-05 11:24:43 UTC  |  Edited by: Icahmura Hasaki
Basic CREST support has been added using dynamics. All current endpoints should be working. Not sure if I want to spend too much time on it in it's current state as things may likely change still. But if there are requests for it, I can add more robust handling for the current CREST endpoints.

Also added a UserAgent option in App.config, as CCP wants you to use your applications name when requesting data.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#12 - 2014-05-05 11:30:33 UTC
And it seems I had missed the new PI endpoints on the API. I'll be adding those now, along with the other things that changed in the last two API updates. And I'm still taking requests for APIs or features you want to see in EveLib.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#13 - 2014-05-05 11:40:58 UTC
I do not participate in PI, making it hard to test these endpoints. Would someone be willing to share an API key for a PI characters for an hour ? You can delete the key afterwards, or if you're willing to leave it enabled I can write some tests as well. Just send me a PM with the key if you're willing to help out Bear

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#14 - 2014-05-05 12:23:28 UTC  |  Edited by: Icahmura Hasaki
The library has been updated to support the newest version of the API, which includes the addition of four PI endpoints and some other minor changes in existing ones. However, as I do not have access to a API key for PI, absolutely nothing has been tested. I'll need some help with that.

Developer of EveLib and EveAuthUtility

Kendra Zane
Working From Home
#15 - 2014-05-05 21:04:05 UTC
Is this thread safe? I've used another library for a while and found much to my annoyance that is isn't.
Icahmura Hasaki
Perkone
Caldari State
#16 - 2014-05-05 21:18:17 UTC  |  Edited by: Icahmura Hasaki
It should be thread safe, all though I haven't tested it with that in mind. Though, if any issues arise I'm sure I can have it sorted. You cannot however use a shared cache for multiple instances of the library at the moment, so keep that in mind.

If there are any requests for being able to share the cache, I can have implement that too. But I think one of the local proxy solutions would solve that problem in a better way.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#17 - 2014-05-05 21:26:10 UTC
After giving it some thought, I can think of a few things that aren't thread safe, but these are mostly minor issues that I can probably have fixed tomorrow. If you would like to use it in a threaded environment and provide me with bug reports I'm sure we can get rid of them pretty fast.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#18 - 2014-05-06 12:17:09 UTC
I've made a few changes, and it should be thread safe now. In fact it already was, but I've made some optimizations here and there. Please let me know if I've overlooked anything Smile

Developer of EveLib and EveAuthUtility

Hel O'Ween
Men On A Mission
#19 - 2014-05-06 13:33:46 UTC
RO ALEXANDER wrote:
however I might be mistaken but there are certain data pieces (logs, assets list, journal) that are not stored on Eve's CDN and you only get one chance to get the data.


As for journals: you can't get them past a certain date (1 month), but you certianly can retrieve them as often as you like during that period.

Same's true for assets. What you miss ofc is the change of assets in between two cache calls:

- pull API the first time, caching starts
- add item A to your assets
- remove item A from your assets
- caching expires, pull API a second time


From an asset API POV, item A has never existed.

EVEWalletAware - an offline wallet manager.

Icahmura Hasaki
Perkone
Caldari State
#20 - 2014-05-06 14:36:06 UTC
I know the /char/Killlog endpoint won't return any data after the first request, until the cache has expired. Are there any other endpoints with similar behavior?

Also, added basic implementation for Zkillboard.com. However, make sure you read https://neweden-dev.com/ZKillboard_API before using it, as they have quite a few limitations and rules for usage, and incorrect use will get your IP suspended.

Developer of EveLib and EveAuthUtility

123Next pageLast page