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
Xiaou Bijoun
Imperial Academy
Amarr Empire
#341 - 2016-02-23 19:53:24 UTC
Not a problem, this is not a urgent issue, just a hobby. Your help is appreciated. You must be in Europe or somewhere close? I am in Eastern U.S.

Thanks again.
Xiaou Bijoun
Imperial Academy
Amarr Empire
#342 - 2016-02-23 19:55:02 UTC
Woot, that did it. Get some rest.
Icahmura Hasaki
Perkone
Caldari State
#343 - 2016-02-23 20:03:07 UTC
Finally. EveXml has also been updated, as it had the same issues with the newest version of Core. I'm starting to doubt if it was a good idea to separate as it's becoming a nightmare to keep everything updated. Let me know if you run into any other issues.

Developer of EveLib and EveAuthUtility

Xiaou Bijoun
Imperial Academy
Amarr Empire
#344 - 2016-02-24 19:04:22 UTC
I was looking into using the authed crest information and in order to get a refresh token and encoded key, you need to have a developer account and register the application. I got the developer account working. I tried to register my application but the problem is the URL callback. How do you get away with this on a desktop application? I have seen someone mention using localhost with an http listener but this seems problematic. I assume that you have already registered an application because you have a refresh token and encoded key in your EveCrest_Authed_Tests.cs file in the Eve Online Library project. I don't want to use that token and string since they are yours. You probably shouldn't even have them publicly available in the library should you?

Here one of the posts.
https://forums.eveonline.com/default.aspx?g=posts&m=6356570#post6356570
Icahmura Hasaki
Perkone
Caldari State
#345 - 2016-02-24 19:18:42 UTC
Xiaou Bijoun wrote:
I was looking into using the authed crest information and in order to get a refresh token and encoded key, you need to have a developer account and register the application. I got the developer account working. I tried to register my application but the problem is the URL callback. How do you get away with this on a desktop application? I have seen someone mention using localhost with an http listener but this seems problematic. I assume that you have already registered an application because you have a refresh token and encoded key in your EveCrest_Authed_Tests.cs file in the Eve Online Library project. I don't want to use that token and string since they are yours. You probably shouldn't even have them publicly available in the library should you?

Here one of the posts.
https://forums.eveonline.com/default.aspx?g=posts&m=6356570#post6356570


Using a local http server is one solution yeah, there is no easy solution to this. You can use my EveAuthUtility to get the tokens manually. There isn't really much harm in having it public in my case.

Developer of EveLib and EveAuthUtility

Xiaou Bijoun
Imperial Academy
Amarr Empire
#346 - 2016-02-26 04:28:01 UTC
In an earlier post you mentioned that there is a place to add your program name in App.Config. How do I go about setting this in my project?
Xiaou Bijoun
Imperial Academy
Amarr Empire
#347 - 2016-02-27 00:42:28 UTC  |  Edited by: Xiaou Bijoun
My code was running today but after the shutdown, I am now getting errors on the EveXml.GetCharInfoAsync() function.

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.Xml.XmlException: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

I can get you more of the exception information if you need.

Thank you

Edit: It looks like the API server is down. This is probably related.
Icahmura Hasaki
Perkone
Caldari State
#348 - 2016-02-27 08:45:49 UTC
Just add app.config in your project and change configuration->appSettings->eveLib.UserAgent if I remember correctly. It just changes the user agent user for http requests tho.

Let me know if still you have issues after the API is back up.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#349 - 2016-02-28 18:56:03 UTC  |  Edited by: Icahmura Hasaki
Icahmura Hasaki
Perkone
Caldari State
#350 - 2016-02-29 20:55:51 UTC
Support for post/put/delete is getting really close, I expect to put up a beta within the new few days. I'm implementing it using an active record pattern, but I'm open to feedback and ideas for other implementations if anyone has input.

An example of adding a new contact:

public async Task AddContact() {
            var contact = (await (await (await crest.GetRootAsync()).QueryAsync(r => r.Decode)).QueryAsync(r => r.Character)).Contacts.Create();
            contact.Contact.Href = "https://crest-tq.eveonline.com/alliances/99000006/";
            contact.Contact.Name = "test";
            contact.Contact.Id = 99000006;
            contact.ContactType = "Alliance";
            contact.Standing = 0;
            await contact.Save();
}


Editing:

        public async Task DeleteContact() {
            var contacts =
          await (await (await (await crest.GetRootAsync()).QueryAsync(r => r.Decode)).QueryAsync(r => r.Character)).QueryAsync(r => r.Contacts);
            var contact = contacts.Items.Single(r => r.Contact.Id == 99000006);
            contact.Contact.Standing = 5;
            contact.Save();



And deleting:

        public async Task DeleteContact() {
            var contacts =
          await (await (await (await crest.GetRootAsync()).QueryAsync(r => r.Decode)).QueryAsync(r => r.Character)).QueryAsync(r => r.Contacts);
            var contact = contacts.Items.Single(r => r.Contact.Id == 99000006);
            contact.Delete();


Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#351 - 2016-03-01 21:09:47 UTC  |  Edited by: Icahmura Hasaki
Can someone tell me whether the fitting resource supports put ?
I've got post/put/delete working for contacts, and post/delete for fits, but I can't seem to get put working. Any ideas ?

edit: nvm, it doesn't support put. Beta coming this weekend :)

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#352 - 2016-03-03 17:19:28 UTC
Icahmura Hasaki
Perkone
Caldari State
#353 - 2016-03-03 19:39:29 UTC
For anyone wanting to test the post/put/delete features, a fully working version is available here: https://github.com/ezet/evelib/tree/beta

It currently supports all writable endpoints, that is:
Contact: post, put, delete
Fittings: post, delete
Waypoints: post

For examples, please refer to
https://github.com/ezet/evelib/blob/beta/EveLib.Tests/EveCrest_Authed_Tests%20.cs
or feel free to ask me.

If you have any concerns, suggestions or any feedback at all, please let me know :)

Developer of EveLib and EveAuthUtility

Xiaou Bijoun
Imperial Academy
Amarr Empire
#354 - 2016-03-13 15:32:44 UTC
Does anyone know who to contact about the public crest server being down?
Aio Kaze
Black Shell Industries
#355 - 2016-03-13 16:07:20 UTC
Any time I notice it's down I tweet to @EVE_Status.
Icahmura Hasaki
Perkone
Caldari State
#356 - 2016-03-16 19:18:02 UTC  |  Edited by: Icahmura Hasaki
EveCrest 3.3 is out! This is a major feature release, introducing support for POST, PUT and DELETE requests.

https://www.nuget.org/packages/eZet.EveLib.EveCrest/3.3.1
Release Notes: https://github.com/ezet/evelib/releases/tag/EveCrest_v3.3.0

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#357 - 2016-03-16 20:17:31 UTC
I'm working on updating the Wiki with documentation for the new features.

https://github.com/ezet/evelib/wiki/Module:-EveCrest#post

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#358 - 2016-03-17 19:40:20 UTC
EveCrest 3.3.2 is out, which cleans up some of the API introduced in 3.3.
Relase notes: https://github.com/ezet/evelib/releases/tag/EveCrest_v3.3.2

Also, a new version of EveXml was released yesterday, fixing TrainingStartTime and TrainingEndTime issues with the SkillInTraining endpoint.

Developer of EveLib and EveAuthUtility

Laura Shimaya
Companion Cube Corp.
#359 - 2016-03-19 16:30:44 UTC
How to get all MarketTypes or ItemsTypes from Crest?

The following does nothing:

var items = crest.GetRoot().Query(x => x.MarketTypes).AllItems();

or

var items = crest.GetRoot().Query(x => x.ItemTypes).AllItems();

I tried this:

var item = crest.GetRoot().Query(x => x.ItemTypes).Query(x => x.Single(r => r.Name == "Medium Remote Armor Repairer II"));

But this does nothing as wel.


I want to get Items by name and then pass their HREF as a parameter to the following instead of the hardcoded url:


var theforge = crest.GetRoot().Query(r => r.Regions).Query(x => x.Single(r => r.Name == "The Forge"));
var orders = theforge.Query(r => r.MarketBuyOrders, "type", "https://public-crest.eveonline.com/types/20414/");



Thanks in advance!
Icahmura Hasaki
Perkone
Caldari State
#360 - 2016-03-19 20:19:43 UTC
Laura Shimaya wrote:
How to get all MarketTypes or ItemsTypes from Crest?

The following does nothing:

var items = crest.GetRoot().Query(x => x.MarketTypes).AllItems();

or

var items = crest.GetRoot().Query(x => x.ItemTypes).AllItems();

I tried this:

var item = crest.GetRoot().Query(x => x.ItemTypes).Query(x => x.Single(r => r.Name == "Medium Remote Armor Repairer II"));

But this does nothing as wel.


I want to get Items by name and then pass their HREF as a parameter to the following instead of the hardcoded url:


var theforge = crest.GetRoot().Query(r => r.Regions).Query(x => x.Single(r => r.Name == "The Forge"));
var orders = theforge.Query(r => r.MarketBuyOrders, "type", "https://public-crest.eveonline.com/types/20414/");



Thanks in advance!


What do you mean by does nothing? Is the list empty, or does the method never return ?

Developer of EveLib and EveAuthUtility