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.
 

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

First post
Author
Mathliney Kagrel
Caldari Provisions
Caldari State
#441 - 2016-06-18 15:16:25 UTC
Icahmura Hasaki wrote:
You are already doing that here:

var root = await crest.GetAsync(crest.Host);


You should be able to request any url using that :)



Yep, just figured :)

Will be handy for sure.
Mathliney Kagrel
Caldari Provisions
Caldari State
#442 - 2016-06-21 07:13:15 UTC
Dread Griffin wrote:
It seems executing a foreach loop on your eZet.EveLib.DynamicCrest.Expando object works fine until the end when I get an exception for the object not containing a definition for 'next'. I've looked up ways to identify if an ExpandoObject contains a given method, but I don't think you can use them to control a foreach call.

I'm currently just catching and suppressing the exception and everything is going fine. I'm not sure if I need to be doing something different or if your object could end a foreach differently.



Beside try...catch you can also use foreach on the expando["items"] and then check for ["next"] to send a new request and treat ["items"] from reply, rince and repeat until ["next"] is null.

Not as convenient but :

1) won't raise exception
2) you can send all requests concurrently, would be faster

Icahmura is surely working on a fix anyway but sending several requests concurrently is a good thing anyway if you ask me.
Xiaou Bijoun
Imperial Academy
Amarr Empire
#443 - 2016-06-24 16:02:44 UTC  |  Edited by: Xiaou Bijoun
I know you are probably concentrating on dynamic crest right now but I have an issue with the xml api for GetPlanetaryPins, the times have no information in them and the QuantityPerCycle is always 0. Everything else is fine.

Thank you.

Update:

I was able to correct the problem in the PlanetaryPins.cs file. The xmlattribute for quantityperCycle should have been quantityPerCycle, which is how it comes in on the Xml stream. The dates were not being converted to DateTime values so I changed it to just update the AsString properties directly and those are now working.
Ashley Traynor
Republic Military School
Minmatar Republic
#444 - 2016-07-27 22:37:44 UTC  |  Edited by: Ashley Traynor
So far I'm pulling my hair out over this. I'm a little new to vb so I might be doing something stupid but this is what i have here:

http://i.imgur.com/ClPkf5p.png

I think I can see why it doesn't work... but could someone help me at all? I'm just trying to use the eve API with XML to write to a Datatable which i can use to fill an ASP Gridview and display corp history
White 0rchid
V0LTA
WE FORM V0LTA
#445 - 2016-08-02 17:33:18 UTC  |  Edited by: White 0rchid
Icahmura Hasaki wrote:
Yeah, the cache folder is in the users Appdata folder on windows machines. This will be a lot easier to change in the next version, but I haven't gotten around to fix it yet. I'm still out for a few days so I won't be able to fix that quite yet unfortunately. You can try changing the cache path before creating the character object

Core.Config.CacheFactory = () => new EveLibFileCache(yourPath + "EveXmlCache", "register");

Or to change the cache on an existing object, set the cache directly

character.RequestHandler.Cache = new EveLibFileCache(yourPath + "EveXmlCache", "register");


It's not letting me do this for some reason. I can't figure out why these permissions dont work.

I'm writing an ASP MVC website and it keeps erroring on the cache, yet all my user accounts have access to AppData.
CCP Phantom
C C P
C C P Alliance
#446 - 2016-12-19 13:28:45 UTC
Thread has been unlocked on request. Originally the thread was automatically locked by the forum software due to inactivity.

CCP Phantom - Senior Community Developer

Icahmura Hasaki
Perkone
Caldari State
#447 - 2016-12-19 18:28:21 UTC
I've just updated most of the modules with bugfixes, which should resolve most of the bugs that have been introduced by new versions of the APIs and Eve Online.

Affected modules are:
Core
EveXml
Crest
EveCentral
EveStaticData
ZKillboard

There are probably some bugs still lingering, but I wanted to publish this update as soon as possible while I still have time. As always, report any bugs here or on github and I'll try to help you.

I do not intent to implement any new features for this library since there is a new API coming. I might finish post/put/delete operations for the dynamic crest library, if time permits.

I'm working on a .NET client for the ESI API, let me know if you're interested in testing it.

Developer of EveLib and EveAuthUtility

Zetsubou Gakusei
Republic University
Minmatar Republic
#448 - 2016-12-23 18:54:08 UTC  |  Edited by: Zetsubou Gakusei
Thanks for updating the library, I recently got back into eve and now I'm again checking out development and I turned again to this lib.

I'm still trying to get the basics done, it's a bit hard though because there are no examples.

By the way what's the difference between the CREST and the Dynamic CREST library?

I don't know the status of ESI yet (is it usable?) but if it works then I'm very interested in testing it out
Icahmura Hasaki
Perkone
Caldari State
#449 - 2016-12-29 10:14:49 UTC
Zetsubou Gakusei wrote:
Thanks for updating the library, I recently got back into eve and now I'm again checking out development and I turned again to this lib.

I'm still trying to get the basics done, it's a bit hard though because there are no examples.

By the way what's the difference between the CREST and the Dynamic CREST library?

I don't know the status of ESI yet (is it usable?) but if it works then I'm very interested in testing it out


There are examples here:
https://github.com/ezet/evelib/wiki/Module:-EveCrest
https://github.com/ezet/evelib/blob/master/EveLib.Tests/EveCrest_Authed_Tests.cs
https://github.com/ezet/evelib/blob/master/EveLib.Tests/EveCrest_Public_Tests.cs

CREST uses typed classes for API data, while dynamic CREST uses dynamically created expando objects.

Developer of EveLib and EveAuthUtility

Aeon Haginen
#450 - 2017-01-10 12:36:36 UTC
Icahmura Hasaki wrote:
I'm working on a .NET client for the ESI API, let me know if you're interested in testing it.


It's not needed. You can auto generate .NET client using official swagger generator at "https://generator.swagger.io/". I've already created small (140 lines including usings and comments) C# program that can automatically download autogenerated .NET library for latest ESI version, extract it and update my sollution with it. Can share it if someone want.
Zetsubou Gakusei
Republic University
Minmatar Republic
#451 - 2017-01-10 12:49:03 UTC
Aeon Haginen wrote:
Icahmura Hasaki wrote:
I'm working on a .NET client for the ESI API, let me know if you're interested in testing it.


It's not needed. You can auto generate .NET client using official swagger generator at "https://generator.swagger.io/". I've already created small (140 lines including usings and comments) C# program that can automatically download autogenerated .NET library for latest ESI version, extract it and update my sollution with it. Can share it if someone want.


Please do, I have almost no idea about how to do this stuff, right now I'm just calling ESI manually through restsharp (and it works only half the time)
Aeon Haginen
#452 - 2017-01-10 13:48:11 UTC
okok, here it is:
http://pastebin.com/0CX20Uy7 and http://pastebin.com/y3WiXGT7 (HttpContent.ReadAsFile).

to include autogenerated swagger client in your project, just create new folder "Swagger" (physical folder, not a project folder) and edit .csproj file:
add:
(Compile Include="Swagger\**\*.cs" /)
into proper location: Project/ItemGroup/ where others (Compile)s are
PS: I'm unable to write proper xml brackets, so I used () instead
Icahmura Hasaki
Perkone
Caldari State
#453 - 2017-01-13 16:50:55 UTC
Aeon Haginen wrote:
Icahmura Hasaki wrote:
I'm working on a .NET client for the ESI API, let me know if you're interested in testing it.


It's not needed. You can auto generate .NET client using official swagger generator at "https://generator.swagger.io/". I've already created small (140 lines including usings and comments) C# program that can automatically download autogenerated .NET library for latest ESI version, extract it and update my sollution with it. Can share it if someone want.


Yes, I'm aware of that. I was working on templates to integrate SSO authentication, eg. EveAuth.

Developer of EveLib and EveAuthUtility

KenFlorian
Jednota Inc
#454 - 2017-04-07 16:06:21 UTC
Icahmura Hasaki wrote:


I'm working on a .NET client for the ESI API, let me know if you're interested in testing it.


I'm interested in working with the ESI implementation.
Mixee
Real Enemy
#455 - 2017-04-18 19:43:41 UTC
Hi,

Thanks for the library I found it very useful, I'd like to ask about some issues;

In EveLibFileCache.cs there's int variable _counter (which I'm guessing is there to throttle hitting the disk with IO writes), which gets compared to some magic number 10, meaning any less than 10 requests, or any requests that didn't fit into a multiple of 10 will not be listed in the "register" file when the program terminates, is that intended behaviour for a cache or is that a bug where the dictionary isn't flushed on termination?

I've hacked around the Core and Xml modules until they worked with .NET Core 1.1 and the (code) changes needed aren't too extensive; namely it's grabbing 5 nugets, replacing instances of WebClient with HttpClient and some minor changes e.g. getting rid of char.ToString(formatter) since it doesn't exist in corefx char api. I didn't tinker with the rest of the modules so I suppose I'm going into assumption here that there's not many changes needed.

So my question is; do you have any plans on supporting .NET core? If not would you consider merging patches to make it a bit easier to do so for people who need it?
Icahmura Hasaki
Perkone
Caldari State
#456 - 2017-05-09 11:21:44 UTC
I haven't looked at this library in a very long time, and currently don't have any plans of updating it. Maybe some time in the future. The ESI library has also been put on hold.

That could very well be a bug, feel free to submit fixes.

If you want to port it to core 1.1 I'd happily accept PRs, but I won't have time to update nuget until summer.

Developer of EveLib and EveAuthUtility