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
SJ Astralana
Syncore
#201 - 2015-06-23 20:30:51 UTC
Icahmura Hasaki wrote:
Anyone have any good ideas for a way to pass parameters when querying crest resources? Such as the market orders, or items in a specific group. They want us to pass along the full crest uri of eg. a ItemType as the parameter, and I can't really think of any good way to do this...

Example: https://api-sisi.testeveonline.com/market/10000002/orders/buy/?type=https://api-sisi.testeveonline.com/types/587/

At the moment I there doesn't seem to be a way to navigate to this from the root? So I'll basically have to construct the URL client side, inserting the region ID and all, which seems to be completely the opposite for how they wanted crest to be used.. ?


Several of us have ranted on inconsistencies like this -- I had to do the same thing unfortunately. I've surfed the code in this library by the way, the CLI utility is inspired, and overall the library is a damn fine piece of work.

Hyperdrive your production business: Eve Production Manager

KillaGouge
Imperial Shipment
Amarr Empire
#202 - 2015-06-26 01:06:56 UTC
Icahmura, I tried adding the NuGet package to a Universal App project in Visual Studio, but apparently it cannnot because of a .Net version targeting error. Do you know how I would get around this?

Thanks
Clyde en Marland
White Fang Militia
Fraternity.
#203 - 2015-06-26 13:52:14 UTC
KillaGouge wrote:
Icahmura, I tried adding the NuGet package to a Universal App project in Visual Studio, but apparently it cannnot because of a .Net version targeting error. Do you know how I would get around this?

Thanks


Change the target .NET Framework of your VS Project to 4.5 Big smile
Brain Gehirn
Macabre Votum
Northern Coalition.
#204 - 2015-07-11 15:41:38 UTC
Hey,

Talking about market orders, the ID is using int32 but its an int64.

Other than that, what would be the best way to grab the public corporation sheet from the API? I have updated the code from GIT and had to rollback some changes to be able to keep querying for that (since the crest corporation endpoint isnt working yet).

Awesome work on this API dude! It's a really good job.
I just had to edit a few things to make it usable / easier to use for me and I will leave it as a suggestion:
- Grab all URL information (crest, sso, xml and so on) from the web.config using some specific tag - its easier to test/deploy if you do that
- At the config class (evelib.core) you are using a fixed appdata value. I had to change that to: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Separator; (I'm using with a website) so maybe you could do some kind of configuration here to set one or another


Other than that I must have made just a few minor implementations. I'm still getting used to GIT so I might attempt to upload these at some point.

Thanks a lot.
Icahmura Hasaki
Perkone
Caldari State
#205 - 2015-07-12 16:31:39 UTC
Thanks for the feedback. I'm actually aware of all of those, just haven't gotten around to fixing it yet. Feel free to send pull requests if you come up with any good solutions.

Can't you just pull the corporation sheet using the regular XML api ? I'm not sure why you would have to roll back any changes for that to work.

I'll have the int32/64 issue fixed, the others might take some time. Glad you like it :)

Developer of EveLib and EveAuthUtility

Verite Rendition
F.R.E.E. Explorer
#206 - 2015-07-15 05:02:33 UTC
Icahmura, does the CREST module work with the new sovereignty structures endpoint, or will a new version be required for that?
Kuja Armitage
Rogue Drones Dancing Tango
#207 - 2015-08-08 23:24:36 UTC
This may be a noobish question, but how can I achieve getting results as from query:

https://public-crest.eveonline.com/market/types/?group=https://public-crest.eveonline.com/market/groups/150/

using this library?

My current code wich I think should work doesn't even compile:

var crest = new EveCrest();
var root = crest.GetRoot();
var types = root.Query(r => r.MarketTypes);
var skillbooks = types.Query(type => type.Where(t => t.MarketGroup.Id == 150));


Basicly what I'm trying to achieve is to get list of all available skillbooks.
Icahmura Hasaki
Perkone
Caldari State
#208 - 2015-08-09 16:28:49 UTC
Verite Rendition wrote:
Icahmura, does the CREST module work with the new sovereignty structures endpoint, or will a new version be required for that?


Wasn't aware of the new endpoint, but I'll have to add that to the next version. Holiday ends next week so I'll get it up then.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#209 - 2015-08-09 16:40:05 UTC  |  Edited by: Icahmura Hasaki
Kuja Armitage wrote:
This may be a noobish question, but how can I achieve getting results as from query:

https://public-crest.eveonline.com/market/types/?group=https://public-crest.eveonline.com/market/groups/150/

using this library?

My current code wich I think should work doesn't even compile:

var crest = new EveCrest();
var root = crest.GetRoot();
var types = root.Query(r => r.MarketTypes);
var skillbooks = types.Query(type => type.Where(t => t.Id == 150));


Basicly what I'm trying to achieve is to get list of all available skillbooks.


Yeah, there are some issues with the Query API. I sort of gave up on it because I really didn't like CREST much.

I don't know how to query for that of the top of my head, I'll get back to you when I have the lib available to test it.

Developer of EveLib and EveAuthUtility

Syrsyrian
The Scope
Gallente Federation
#210 - 2015-08-11 19:24:11 UTC
Someone in this thread may be able to help me here. I appear to be having a permissions issue of sorts when I have a .net MVC project using this library deployed.

To give an example the following lines work perfectly fine until it is deployed which then gives me the error that follows.

Character character = new Character(key.keyId, key.vCode, characterId);

var assets = character.GetAssetList().Result.Items;


Once deployed I get:
Access to the path '\EveLib\EveXmlCache' is denied.


After doing some searching around I gather I do not have permission to access what I assume is the cached xml from the API calls? Or am I missing something incredibly obvious?
Desmont McCallock
#211 - 2015-08-11 19:29:20 UTC
Your app doesn't have access to the folder where EVELib is caching. Give your app access to the folder or run your app on an administrator account.
Syrsyrian
The Scope
Gallente Federation
#212 - 2015-08-11 19:51:25 UTC
Run app as administrator? There is no such folder for me to provide permissions for unfortunately.
Desmont McCallock
#213 - 2015-08-12 06:49:45 UTC
Looking at the code the EveXmlCache is set to be in users' AppData folder and I have seen many occasions where apps have problems when write access to that folder is denied. But hopefully for you you can set the folder where EveLib should cache in the config file ('appSettings/eveLib.AppData').
Icahmura Hasaki
Perkone
Caldari State
#214 - 2015-08-12 08:50:05 UTC  |  Edited by: Icahmura Hasaki
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");

Developer of EveLib and EveAuthUtility

Desmont McCallock
#215 - 2015-08-12 09:51:42 UTC  |  Edited by: Desmont McCallock
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");
Ahh, yes. Taking a closer look AppData path is hardcoded in and in the config you can only set the folder name under AppData. Being able to set the cache path of your choice via config would be a huge plus to your library.
Icahmura Hasaki
Perkone
Caldari State
#216 - 2015-08-12 11:53:40 UTC  |  Edited by: Icahmura Hasaki
Yes it would! But for now either of the two solutions above should work, let me know if they don't :) I'll be fixing this as well as adding the new sovereignty endpoints on CREST for next release.

edit: nvm, you're not the one having the issue are you :).. Syrsyrian, please let me know if that works for you.

Developer of EveLib and EveAuthUtility

Desmont McCallock
#217 - 2015-08-12 12:38:16 UTC
Icahmura Hasaki wrote:
Yes it would! But for now either of the two solutions above should work, let me know if they don't :) I'll be fixing this as well as adding the new sovereignty endpoints on CREST for next release.

edit: nvm, you're not the one having the issue are you :).. Syrsyrian, please let me know if that works for you.
Yeah, I'm just "The EVEMon guy" pitching in to lend a helping hand.
Icahmura Hasaki
Perkone
Caldari State
#218 - 2015-08-12 12:48:07 UTC
Oh, I didn't realize that was you! Any help, input and suggestions is greatly appreciated. :)

Developer of EveLib and EveAuthUtility

Brain Gehirn
Macabre Votum
Northern Coalition.
#219 - 2015-08-12 17:04:10 UTC  |  Edited by: Brain Gehirn
About the MVC question:

I have changed the AppData (under evelib.Core.Config.cs) to:
- AppDomain.CurrentDomain.BaseDirectory + Separator

Also you will need to give write permissions to your application, no need to run it as any specific user. Remember to just give permission to this directory and also make your robots.txt to avoid this same folder :justincase:
Syrsyrian
The Scope
Gallente Federation
#220 - 2015-08-13 02:13:52 UTC
Thanks for the replies, I'll have a go at the suggestions tomorrow.