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
Ocean Cineol
Too Big To Die
#281 - 2015-10-31 15:45:38 UTC
Icahmura Hasaki wrote:
Ocean Cineol wrote:
Your code works fine, I am just trying to implement the IEveLibCache Interface Roll to load the cached data. Seems like I went down too deep.


Ah, okay. Well, your idea should work fine, if thats how you want to do it. As I said, the cached files are available in the CachePath as plain text files, with the filenames being a hash of the url they represent. So if you want to implement your own IEveLibCache to read files stored by my implementation, you need to use the same hash to retrieve the correct file. You'll find the details in my EveLibFileCache, its just a SHA1 with the hyphens (-) removed.



I need a few tips. I always want to save the query results in the same simple .txt file. To load more than 1 item, i increment the ID of the item by 1 in the url(is there a better option?). I end up with lots and lots of files.

To access these with a program i either need to know the right url-hash for every id (i could not figure out how to do that ) or I load it with the cache implementation.

I think that that is the right way to load the cached data:

          string cachePath= @"C:\Users\*****\AppData\Roaming\EveLib\EveCrestCache";
                    string cacheregister= "???";
                    EveLibFileCache cache = new EveLibFileCache(cachePath, cacheregister);


                    Console.WriteLine(cache.LoadAsync(Uri);


Could somebody help me with the right code?
Thanks a lot :)
Icahmura Hasaki
Perkone
Caldari State
#282 - 2015-10-31 16:08:17 UTC
Ocean Cineol wrote:
Icahmura Hasaki wrote:
Ocean Cineol wrote:
Your code works fine, I am just trying to implement the IEveLibCache Interface Roll to load the cached data. Seems like I went down too deep.


Ah, okay. Well, your idea should work fine, if thats how you want to do it. As I said, the cached files are available in the CachePath as plain text files, with the filenames being a hash of the url they represent. So if you want to implement your own IEveLibCache to read files stored by my implementation, you need to use the same hash to retrieve the correct file. You'll find the details in my EveLibFileCache, its just a SHA1 with the hyphens (-) removed.



I need a few tips. I always want to save the query results in the same simple .txt file. To load more than 1 item, i increment the ID of the item by 1 in the url(is there a better option?). I end up with lots and lots of files.

To access these with a program i either need to know the right url-hash for every id (i could not figure out how to do that ) or I load it with the cache implementation.

I think that that is the right way to load the cached data:

          string cachePath= @"C:\Users\*****\AppData\Roaming\EveLib\EveCrestCache";
                    string cacheregister= "???";
                    EveLibFileCache cache = new EveLibFileCache(cachePath, cacheregister);


                    Console.WriteLine(cache.LoadAsync(Uri);


Could somebody help me with the right code?
Thanks a lot :)


The cacheRegister is just a file name, its the file that will be used to keep track of cache times, so it knows when the cache is outdated eg.

The above code should be fine, except how you use the results from LoadAsync(). That just returns a Task, so to access that you would have to either use async await, or in a console application where you just want to print, you can use

Console.WriteLine(cache.LoadAsync(uri).Result);

Accessing .Result forces synchronization, which in general isn't a good way to do that, but in a simple test app it's fine.

Developer of EveLib and EveAuthUtility

iwannadig
Doomheim
#283 - 2015-11-17 20:41:53 UTC
I downloaded the latest NuGet and try to create authenticated CREST, but I see only one contstructor for public CREST: http://i.imgur.com/87IExUI.png
What am I doing wrong?

Btw, https://developers.eveonline.com/resource/single-sign-on link in github readme is dead.
Icahmura Hasaki
Perkone
Caldari State
#284 - 2015-11-17 20:47:19 UTC
iwannadig wrote:
I downloaded the latest NuGet and try to create authenticated CREST, but I see only one contstructor for public CREST: http://i.imgur.com/87IExUI.png
What am I doing wrong?

Btw, https://developers.eveonline.com/resource/single-sign-on link in github readme is dead.


That looks like an old version, where did you download from exactly ?

Developer of EveLib and EveAuthUtility

iwannadig
Doomheim
#285 - 2015-11-17 20:55:46 UTC  |  Edited by: iwannadig
Icahmura Hasaki wrote:
iwannadig wrote:
I downloaded the latest NuGet and try to create authenticated CREST, but I see only one contstructor for public CREST: http://i.imgur.com/87IExUI.png
What am I doing wrong?

Btw, https://developers.eveonline.com/resource/single-sign-on link in github readme is dead.


That looks like an old version, where did you download from exactly ?

Oh, I see. It shows 2.0.5.2, while the latest is 3.0.0. I'm using VS 2010 with .NET 4.0, so I think this is the reason.
Did you move to 4.5?
UPD: yes, I see. I'll try to downgrade it manually.
Quackers Duckington
Interbellum
#286 - 2015-12-27 18:27:47 UTC  |  Edited by: Quackers Duckington
Does anyone have any examples of going through a whole users wallet using the lastid in the xmlapi in C#, Im having a mental block and just cant get it to work for the life of me =/

Edit: slept on it and turns out I was being and idiot
Malkys en Daire
Malkys INC.
#287 - 2015-12-30 11:23:03 UTC  |  Edited by: Malkys en Daire
First off: Awesome work from the dev here!

I'm already doing some marketstuff with it, like reading orders, prices, regions etc.

But I can't get a touch on market history data, just because I don't find the right "path" to it.
Can somebody give me a quick hint?

Thanks!


edit: I solved it with crest.GetMarketHistory, what's the new way? :)
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#288 - 2016-01-05 12:50:27 UTC
Icahmura Hasaki wrote:
Malketh Terona wrote:
Trying to install this in a Universal app project in VS2015 and I'm getting an error message stating that all of the packages are "not compatible with UAP,Version=v10.0 (win10-x64-aot)". Thought you might like to know.


Thanks for the feedback, I'll have a look at it :)


first, thx for all the work on this project!

is there any news on when this will be available for universal apps ?
Crow LightBringer
Dropbears Anonymous
Brave Collective
#289 - 2016-01-15 01:31:50 UTC  |  Edited by: Crow LightBringer
EDIT. I was dumb and forgot about the verify method.... I got it sorted xD

Good Work Dev! :-)
Evalla von'Shurr
von'Shurr Inc
#290 - 2016-01-17 22:15:15 UTC  |  Edited by: Evalla von'Shurr
Hello, for some reason the Query method doesn't want to take more than 2 arguments.

When I try to do:

var allbuys = theforge.Query(r => r.MarketBuyOrders, "type", "https://public-crest.eveonline.com/types/34/");

It throws me overload.

I'm using VS2012, should I change to VS2015? (VS12 supports .net 4.5)


Thanks in advance, btw, great work.



EDIT: Nevermind, made it work.
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#291 - 2016-01-21 09:25:45 UTC
i got the EVE SSO working last night and wanted to reach the latest endpoints whit the player location..
but for some reason i cant find them..??

i did use this to call the right crest init:
EveCrest crest = new EveCrest(refreshToken, base64Key);

any help is welcome!

NullBy7e
Artemis Superiority Conclave
Firestorm Vanguard
#292 - 2016-02-08 08:33:32 UTC  |  Edited by: NullBy7e
o7

I've been using this library for quite some time now, thanks for making this, OP, it's great.
The NuGet package is not up to date with the actual version on GitHub, it took me awhile to find that out (I was missing things such as the different scopes in the enum).
NullBy7e
Artemis Superiority Conclave
Firestorm Vanguard
#293 - 2016-02-08 08:36:00 UTC
Jarno Midumulf wrote:
i got the EVE SSO working last night and wanted to reach the latest endpoints whit the player location..
but for some reason i cant find them..??

i did use this to call the right crest init:
EveCrest crest = new EveCrest(refreshToken, base64Key);

any help is welcome!



Need more information, that code doesn't show us what's wrong.
Also if you used NuGet to get the library, try compiling the source rom GitHub instead.
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#294 - 2016-02-08 13:42:54 UTC
NullBy7e wrote:
Jarno Midumulf wrote:
i got the EVE SSO working last night and wanted to reach the latest endpoints whit the player location..
but for some reason i cant find them..??

i did use this to call the right crest init:
EveCrest crest = new EveCrest(refreshToken, base64Key);

any help is welcome!



Need more information, that code doesn't show us what's wrong.
Also if you used NuGet to get the library, try compiling the source rom GitHub instead.


working on my own wrapper now since this is not getting any off the new endpoints..
NullBy7e
Artemis Superiority Conclave
Firestorm Vanguard
#295 - 2016-02-08 15:09:20 UTC
Jarno Midumulf wrote:
NullBy7e wrote:
Jarno Midumulf wrote:
i got the EVE SSO working last night and wanted to reach the latest endpoints whit the player location..
but for some reason i cant find them..??

i did use this to call the right crest init:
EveCrest crest = new EveCrest(refreshToken, base64Key);

any help is welcome!



Need more information, that code doesn't show us what's wrong.
Also if you used NuGet to get the library, try compiling the source rom GitHub instead.


working on my own wrapper now since this is not getting any off the new endpoints..


Feel free to write it as extension for EveLib, so others can use it as well.
It is open-source afterall.
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#296 - 2016-02-08 18:11:16 UTC
NullBy7e wrote:
Jarno Midumulf wrote:
NullBy7e wrote:
Jarno Midumulf wrote:
i got the EVE SSO working last night and wanted to reach the latest endpoints whit the player location..
but for some reason i cant find them..??

i did use this to call the right crest init:
EveCrest crest = new EveCrest(refreshToken, base64Key);

any help is welcome!



Need more information, that code doesn't show us what's wrong.
Also if you used NuGet to get the library, try compiling the source rom GitHub instead.


working on my own wrapper now since this is not getting any off the new endpoints..


Feel free to write it as extension for EveLib, so others can use it as well.
It is open-source afterall.


well.. i can try to make it work in that project but if he isn't active he probably wont merge it...
NullBy7e
Artemis Superiority Conclave
Firestorm Vanguard
#297 - 2016-02-09 08:10:48 UTC
Jarno Midumulf wrote:
NullBy7e wrote:
Jarno Midumulf wrote:
NullBy7e wrote:
Jarno Midumulf wrote:
i got the EVE SSO working last night and wanted to reach the latest endpoints whit the player location..
but for some reason i cant find them..??

i did use this to call the right crest init:
EveCrest crest = new EveCrest(refreshToken, base64Key);

any help is welcome!



Need more information, that code doesn't show us what's wrong.
Also if you used NuGet to get the library, try compiling the source rom GitHub instead.


working on my own wrapper now since this is not getting any off the new endpoints..


Feel free to write it as extension for EveLib, so others can use it as well.
It is open-source afterall.


well.. i can try to make it work in that project but if he isn't active he probably wont merge it...


You can create a fork of his project and continue developing at as if it were your own.
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#298 - 2016-02-09 12:30:18 UTC  |  Edited by: Jarno Midumulf
NullBy7e wrote:
Jarno Midumulf wrote:
...wall off quotes...


You can create a fork of his project and continue developing at as if it were your own.


yeah i know, the point was more to not create a fork and split it up..
but i will see wat i can do and post results when i have them!

edit:
fork has been made.
moved the readme to wiki.
will start adding endpoints from tonight on, if you have something missing please make a post here or on git!
Icahmura Hasaki
Perkone
Caldari State
#299 - 2016-02-13 10:15:05 UTC  |  Edited by: Icahmura Hasaki
Hey, just letting you know I'm still around, and I'll be more than happy to merge if that's what you want. I haven't abandoned the project, just haven't had time lately. I intend to keep developing this, but feel free to add any new endpoints and send merge requests. Adding new GET endpoints is relatively easy and straight forward, I still haven't found a definitive way to deal with crest POST requests. If anyone wants to add new endpoints and needs pointers let me know, but it should be fairly obvious from the existing code.

edit: I'll look into updating the nuget packages today.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#300 - 2016-02-13 19:41:29 UTC
I'm working on implementing the new additions to CREST at the moment, except the POST feature for fittings, which I have started but didn't finish yet. I'll update NuGet as soon as I have added the simple changes.

Developer of EveLib and EveAuthUtility