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
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#301 - 2016-02-14 17:55:47 UTC
nice!!

i didnt had the time yet to take a good look at it.. do you have a list of wat end points are missing?
we could make bugs for each one that is missing?
Icahmura Hasaki
Perkone
Caldari State
#302 - 2016-02-14 18:06:48 UTC  |  Edited by: Icahmura Hasaki
Jarno Midumulf wrote:
nice!!

i didnt had the time yet to take a good look at it.. do you have a list of wat end points are missing?
we could make bugs for each one that is missing?


I'm almost done with all the new GET resources, managing fittings, contacts and waypoints will take some more time. They can all be retrieved, but not changed.

edit: But yes, please file bug reports for any missing endpoints, or missing data fields from supported resources.

Developer of EveLib and EveAuthUtility

Icahmura Hasaki
Perkone
Caldari State
#303 - 2016-02-14 19:47:52 UTC
I have pushed an update for EveCrest to NuGet. Please test it out and let me know if anyone is having issues. It's been a long time since I worked on this, it might be possible that I have to push an update for Core too, and I'll do that if anyone is having issues.

Release notes:
https://github.com/ezet/evelib/releases/tag/EveCrest_v3.2.0

Developer of EveLib and EveAuthUtility

Aio Kaze
Black Shell Industries
#304 - 2016-02-15 03:09:10 UTC  |  Edited by: Aio Kaze
I'm pretty new to the whole C# thing (Literally my first time outside of mucking around in Unity) so this might just be me being stupid but I'm having a problem with that new CREST version you released.

I have the following code with a TextBox in an otherwise empty Windows Form Project (pared down for testing this error):


using System;
using System.Linq;
using System.Windows.Forms;
using System.IO;
using eZet.EveLib.EveCrestModule;


namespace EveCrestTypesTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            LoadTypes();
        }

        private void LoadTypes()
        {
            textBox1.Text += "Setting up.\r\n";
            EveCrest crest = new EveCrest();
            var root = crest.GetRoot();
            textBox1.Text += "Testing types loading.\r\n";
            var types = root.Query(r => r.MarketTypes);
            var list = types.Items.ToList();
            while (types.Next != null)
            {
                try
                {
                    types = types.Query(t => t.Next);
                    list.AddRange(types.Items);
                    textBox1.Text += list.Count + " types loaded.\r\n";
                }
                catch(AggregateException e)
                {
                    File.AppendAllText(Application.StartupPath + "\\logs\\log.txt", e.InnerException.ToString() + "\r\n\r\n");
                    MessageBox.Show("Wrote error to file.");
                    System.Environment.Exit(e.InnerException.HResult);
                }
            }
            textBox1.Text += "Types loaded.";
        }
    }
}



If I add the current NuGet version of EveLib (3.0.0, I don't see 3.2.0 over there) as a project reference, everything compiles fine and the program loads all of the types, with no exceptions. However, if I grab 3.2.0 from GitHub, compile it and use that as a reference, I get the following exception thrown:

eZet.EveLib.EveCrestModule.Exceptions.EveCrestException: The query parameter page were cast able to type integerType, error invalid literal for long() with base 10: '2?' ---> System.Net.WebException: The remote server returned an error: (415) Unsupported Media Type.


Edit: I found 3.2.0 on NuGet (I was checking the website, not the package manager in VS2015, like a dummy) but it throws the same exception.
Icahmura Hasaki
Perkone
Caldari State
#305 - 2016-02-15 08:27:30 UTC
Thanks for the feedback, I've removed 3.2.0 from NuGet for now and I'll attempt to fix it tonight.

Developer of EveLib and EveAuthUtility

NullBy7e
Artemis Superiority Conclave
Firestorm Vanguard
#306 - 2016-02-15 09:40:44 UTC
Good to see that EveLib is still actively maintained.
Yeah, NuGet is not up to date with the master branch, I just downloaded the source and added the projects separately in my solution.
Aio Kaze
Black Shell Industries
#307 - 2016-02-15 17:49:49 UTC
Is there a specific function for getting CREST market history data without constructing URLS? The only function I've found is GetMarketHistory(int regionID, int typeID) and its Async version, both of which are marked as obsolete and tell me to navigate to an endpoint from the root, but I can't find one.

As a sidenote, individual Regions don't seem to contain their IDs, meaning I have to go back up to the RegionCollection and find it again from there.
Icahmura Hasaki
Perkone
Caldari State
#308 - 2016-02-15 17:55:37 UTC  |  Edited by: Icahmura Hasaki
Aio Kaze wrote:
Is there a specific function for getting CREST market history data without constructing URLS? The only function I've found is GetMarketHistory(int regionID, int typeID) and its Async version, both of which are marked as obsolete and tell me to navigate to an endpoint from the root, but I can't find one.

As a sidenote, individual Regions don't seem to contain their IDs, meaning I have to go back up to the RegionCollection and find it again from there.


The "correct" way to currently is to construct urls and append them as explained 1 or 2 pages back, unfortunately. I'll be looking into that next, after this update. I'll have a look at region IDs, just fixed the issue you mentioned earlier about the new version :)

edit:
var BlackRise = crest.GetRoot().Query(a => a.Regions).Query(b=> b.Single(x => x.Name == "BlackRise"));
BlackRise.MarketBuyOrders += "?type=https://public-crest.eveonline.com/types/2/";
var orders = BlackRise.Query(c=> c.MarketBuyOrders).AllItems();

So you get find the MarketOrders resource from the root, but you have to append the type parameter.

Developer of EveLib and EveAuthUtility

Aio Kaze
Black Shell Industries
#309 - 2016-02-15 18:20:44 UTC
Icahmura Hasaki wrote:
Aio Kaze wrote:
Is there a specific function for getting CREST market history data without constructing URLS? The only function I've found is GetMarketHistory(int regionID, int typeID) and its Async version, both of which are marked as obsolete and tell me to navigate to an endpoint from the root, but I can't find one.

As a sidenote, individual Regions don't seem to contain their IDs, meaning I have to go back up to the RegionCollection and find it again from there.


The "correct" way to currently is to construct urls and append them as explained 1 or 2 pages back, unfortunately. I'll be looking into that next, after this update. I'll have a look at region IDs, just fixed the issue you mentioned earlier about the new version :)

edit:
var BlackRise = crest.GetRoot().Query(a => a.Regions).Query(b=> b.Single(x => x.Name == "BlackRise"));
BlackRise.MarketBuyOrders += "?type=https://public-crest.eveonline.com/types/2/";
var orders = BlackRise.Query(c=> c.MarketBuyOrders).AllItems();

So you get find the MarketOrders resource from the root, but you have to append the type parameter.


Ah, okay. I was confused because the GetMarketHistory() obsolete message was specifically telling me to look for something in the root and had wondered if something had changed in the couple months since that post.

Also, that was fast. :)
Icahmura Hasaki
Perkone
Caldari State
#310 - 2016-02-15 18:26:08 UTC
The EveCrest.GetX() functions are leftovers from the initial versions, and uses hardcoded URLs to access the resouces ,which is why they are deprecated. They will be removed for the next major release, since they are breaking changes. Just fixed the missing RegionID, anything else I should get done before I release this version?

Developer of EveLib and EveAuthUtility

Aio Kaze
Black Shell Industries
#311 - 2016-02-15 18:32:38 UTC
I haven't come across any other errors so that should be everything I noticed fixed. :)
Icahmura Hasaki
Perkone
Caldari State
#312 - 2016-02-15 19:15:53 UTC
Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#313 - 2016-02-16 22:31:39 UTC  |  Edited by: Jarno Midumulf


nice!

how far are you whit contact write ? (not sure how i can add that my self..).

i will keep an eye out on te git repo and add what i can and make bug reports for the things i dont know how

Edit: you didn't update "EveAuth" in nuget?
Icahmura Hasaki
Perkone
Caldari State
#314 - 2016-02-17 07:50:15 UTC  |  Edited by: Icahmura Hasaki
Jarno Midumulf wrote:


nice!

how far are you whit contact write ? (not sure how i can add that my self..).

i will keep an eye out on te git repo and add what i can and make bug reports for the things i dont know how

Edit: you didn't update "EveAuth" in nuget?


EveAuth will be updated tonight. Is that causing any issues now ?

Crest POST/PUT/DELETE is still a ways off because I still haven't decided how I want the API to look, and as far as I remember I had some issues with POST or PUT last time I tried. This is what I'll be working on next however, so it might be done in a few days.

Developer of EveLib and EveAuthUtility

Jarno Midumulf
Riders of Sleipnir
Backdoor Crashers
#315 - 2016-02-17 08:29:10 UTC
Icahmura Hasaki wrote:
Jarno Midumulf wrote:


nice!

how far are you whit contact write ? (not sure how i can add that my self..).

i will keep an eye out on te git repo and add what i can and make bug reports for the things i dont know how

Edit: you didn't update "EveAuth" in nuget?


EveAuth will be updated tonight. Is that causing any issues now ?

Crest POST/PUT/DELETE is still a ways off because I still haven't decided how I want the API to look, and as far as I remember I had some issues with POST or PUT last time I tried. This is what I'll be working on next however, so it might be done in a few days.


if you use it to get the auth url and if you use it to out then yeah.. you added char location but not the scope to it...
so you can not get the char location without the correct scope ;)

i did push a fix to git last night, didn't add the other missing scopes yet since those are not int use yet..
but i can add those as well if you want.

it would be nice if you can get the contacts to work (or just the post, put, delete in general), working on a project that needs it ;)
do you mind sharing what the problem is?
Icahmura Hasaki
Perkone
Caldari State
#316 - 2016-02-17 18:08:17 UTC  |  Edited by: Icahmura Hasaki
Icahmura Hasaki
Perkone
Caldari State
#317 - 2016-02-17 20:09:23 UTC
I also forgot to add that EveCrest supports parameters now.

Added support for parameters. Each parameter must consist of a name and value pair. Example:
region.Query(r => r.MarketBuyOrders, "type", "https://public-crest.eveonline.com/types/34/");

The old way of appending the query string at the end of the href still works, but the above way is cleaner. Ideally, you should fetch the type first, and then use the type.Url as a parameter instead of a hardcoded string.

Also, is there any way at all to navigate from crest root to market history? If not I will remove the deprecated tag from this and keep it around.

Developer of EveLib and EveAuthUtility

Aio Kaze
Black Shell Industries
#318 - 2016-02-17 20:53:16 UTC
https://forums.eveonline.com/default.aspx?g=posts&t=403600

Not yet, but it's on their (very long) list of things to fix.
Icahmura Hasaki
Perkone
Caldari State
#319 - 2016-02-17 22:49:20 UTC
Ah, thanks for that. I'm making good progress on the post/put/delete requests, so I might be able to finish it this weekend.

Developer of EveLib and EveAuthUtility

Xiaou Bijoun
Imperial Academy
Amarr Empire
#320 - 2016-02-19 17:36:34 UTC
Still learning how to use the library. I have used the Query MarketTypes to get a list of the market types. Each MarketTypeCollection Item has has two properties MarketGroup and Type.

I would like to get an ItemType object from the Type's Uri and the icon from the Icon's Uri. How do I run a query on these and what type of object do I put it in?

For example Plagioclase (note it won't let me put more explicit text because it says no html even though I see links in previous posts),
I would like to get an ItemType object so I can access the properties and attributes of items and an Image object.

Also, the MargetGroup property for Plagioclase has it's Uri set correctly, but it's Name property is null. Is this intentional and I would have to put the correct name string in this object by getting it from either the endpoint itself or my MarketGroup list retrieved from a Query of MarketGroups, or is this a bug and it should be populated. The Type property has it's Name is set to "Plagioclase".

Another question, does your web access abide by the 120 request per second with 400 request per seconds burst and 20 open connections limits specified for Crest?

I have the latest source code from github so if you want you could reference the source code in any explanations.

Thank you in advance.