Pages: 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 .. 15 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 2 post(s) |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.03.22 22:27:29 -
[361] - Quote
Paranid Warrier wrote:Hello, Thank you for your tremendous efforts on creating this .NET library !!! It is very useful. One question, when are you going o implement fetching Buy and Sell region orders ? I see that currently the maximum I can get is the URI of market orders.
Thanks !
Orders are supported.
https://forums.eveonline.com/default.aspx?g=posts&m=6348742#post6348742
|
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.03.23 15:11:11 -
[362] - Quote
Some neat new features coming up.
All CollectionResource objects implement IEnumerable, which works with automatic pagination. That is, any operation defined on IEnumerable will work across all pages in the collection by default. The CollectionResource.Items property will still only hold the local items for the specific page the object represents.
The pagination logic is also improved, only loading the next page when required. LINQ queries will be smarter and can perform better if you pay attention to how you write them. Operations such as Where(), ToList() and Single() will still enumerate the complete collection, while First() will stop and return the first match it finds. Using First() on collections with many pages can provide huge performance benefits and decrease the amount of requests considerably.
This also makes the code slightly neater, and is backwards compatible. Previously, the Query() API let you omit the .Items property and would use automatic pagination to operate on all items in the collection. However, outside the Query() methods, you would have to get the Items property explicitly, and all operations were on the local items unless AllItems() were used.
Now, all operations on the collection object default to all items, adhering to general LINQ guidelines, and works similarly to ie. Entity Framework. The default implementation of ToList() and my ToListAsync() mostly replace AllItems() and AllItemsAsync(), with the exception that if Automatic Pagination is disabled, ToList() only returns the local list, while AllItems() always return the full collection.
Examples:
// Inside a Query statement, the API remains the same Quote: var alliances = _crest.GetRoot().Query(r => r.Alliances); var alliance = alliances.Query(r => r.First(a => a.ShortName == "MZR"));
The difference is that previously all the pages in the collection would be queried. Now we query one page at a time until we find a match, and return that.
// Outside a query statment
var alliances = _crest.GetRoot().Query(r => r.Alliances); var old = alliances.AllItems().First(a => a.ShortName == "MZR"); var now = alliances.First(a => a.ShortName == "MZR");
Now, operating directly on the Collection object is similar to operating on AllItems() previously, except we now have the smarter IEnumerable implementation. Using .Items is still the same as before, only operating on local items.
Another new feature is simpler query parameters. You no longer need to specify the parameter name, all tho that option remains. Resources that can be used as parameters are bound to a default parameter name, and you can pass the whole Entity object as a parameter.
Examples:
var itemLink = _crest.GetRoot().Query(r => r.ItemTypes).First(); var itemResource = crest.Load(itemLink); var region = _crest.GetRoot() .Query(r => r.Regions) .Query(r => r.Items.First()); var old = region.Query(r => r.MarketBuyOrders, "type", itemLink.Uri); var now = region.Query(r => r.MarketBuyOrders, itemLink); var now2 = region.Query(r => r.MarketBuyOrders, itemResource);
As you can see, this works with both a LinkedEntity object, and a CrestResource object. |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.03.23 18:27:03 -
[363] - Quote
Core, EveCrest and EveXml have been updated, as always let me know if there are any issues.
https://github.com/ezet/evelib/releases/tag/EveCrest_v3.4.0 https://github.com/ezet/evelib/releases/tag/Core_v3.0.6 https://github.com/ezet/evelib/releases/tag/EveXml_v3.0.7 |
Xiaou Bijoun
X-Fleet Phantoms Care Factor
1
|
Posted - 2016.03.23 21:15:22 -
[364] - Quote
Haven't updated in a while, but this version broke some stuff.
Today I went from... Core 3.0.3.0 to 3.0.5.0 EveCrest 3.2.4.0 to 3.3.3.0 EveXml 3.0.5.0 to 3.0.6.0 NewtonSoft.Json 8.0.2 to 8.0.3
Currently using .net 4.5.2 in case that has relevance.
This call now causes an exception but I am guessing it has to do with some of the updates shown above.
var sellordercollection = await toolbox.eveCrest.LoadAsync(region.MarketSellOrders, "type", item.type);
item.type = "https://public-crest.eveonline.com/types/27912/"
I get "Invalid URI: The URI scheme is not valid."
EDIT: Also the exception being thrown is 'System.UriFormatException'. I have a try catch but for AggregateException, which I though that you mentioned somewhere is how you throw exceptions from inside your library. |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.03.23 21:33:57 -
[365] - Quote
You should be on Core 3.0.6 and EveCrest 3.4.0. If you use async/await, you do not need to worry about AggregateException. Just catch exceptions as normal, those are only thrown if you're using the blocking (non async) methods.
I'll have a look at that right away, but it might already be fixed if you get the latest updates. |
Xiaou Bijoun
X-Fleet Phantoms Care Factor
1
|
Posted - 2016.03.23 23:16:59 -
[366] - Quote
So I updated to 3.0.6 core and 3.4.0 crest but still does not work. I can fall back to a previous version and it works.
I tried to copy the example that you had in earlier post but the line
var old = region.Query(r => r.MarketBuyOrders, "type", itemLink.Uri);
gives error that itemLink.Uri does not exist and had to change to itemLink.Href.Uri.
Also that code appears to look for MarketBuyOrders of type #System.
I am guessing that is just an example, but it does work. |
Hel O'Ween
Men On A Mission
156
|
Posted - 2016.03.24 16:56:52 -
[367] - Quote
Xiaou Bijoun wrote:So I updated to 3.0.6 core and 3.4.0 crest but still does not work. I can fall back to a previous version and it works.
I tried to copy the example that you had in earlier post but the line
var old = region.Query(r => r.MarketBuyOrders, "type", itemLink.Uri);
gives error that itemLink.Uri does not exist and had to change to itemLink.Href.Uri.
Also that code appears to look for MarketBuyOrders of type #System.
I am guessing that is just an example, but it does work.
Without knowing EveLib, my guess is that "type" in r.MarketBuyOrders, "type", itemLink.Uri) is meant to be replaced with the item's real typeID (from table invTypes), because #System has typeID 0, to which "type" would be converted if treated as a numeric value. I.e. the all to popular Tritanuim example has the typeID 34.
EVEWalletAware - an offline wallet manager.
|
Xiaou Bijoun
X-Fleet Phantoms Care Factor
1
|
Posted - 2016.03.24 20:48:13 -
[368] - Quote
The "type" is a named parameter that actually gets appended to the Uri used to access the market order endpoint.
Here is the console output of the actual command generated for a concussion bomb from Domain.
https://public-crest.eveonline.com/market/10000043/orders/sell/?type=https://public-crest.eveonline.com/types/27912/&
You can see the endpoint for sell orders from domain
https://public-crest.eveonline.com/market/10000043/orders/sell/
has a type parameter
?type=
which is set to the Concussion Bomb (Type.ID = 27912) endpoint's Uri
https://public-crest.eveonline.com/types/27912/&
Is the & at the end necessary? or an artifact of possibly adding more parameters?
|
Xiaou Bijoun
X-Fleet Phantoms Care Factor
1
|
Posted - 2016.04.21 17:08:25 -
[369] - Quote
Has this forum thread died out? I have been trying to post a question and it doesn't seem to be working.
EDIT: Okay it is working.
I am having an issue with the ZKillboard constructor.
It throws an exception.
"Field not found: 'eZet.EveLib.Core.Config.CacheFactory'."
It works in the evelib-master project in both the ZKillboard_Test and directly create my own ZKillboard object.
My project has many other libraries used including Newsoft.Json. Is it possible there is some conflict? I was wondering if it was using statements but it would not compile if the correct using statements were missing right?
My thought is to start a new project and only use the ZKillboard object to begin with to make sure it works, then start adding in other libraries until I can duplicate the problem.
Any other thoughts? |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.04.22 13:20:02 -
[370] - Quote
If the nuget version isnt working, but the master branch is, I suspect I just didnt update the nuget version correctly, so it's referring to an older version of Core, which causes that error. I'm 99% sure that's the reason, I'll have a look later. ZKillboard currently isn't able to parse all the data from the statistics endpoint they provide, I ran into some issues with parsing some of the more complex data.
About your previous question, the & at the end of the url isn't necessary. |
|
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.04.23 17:09:39 -
[371] - Quote
I've updated ZKillboard on nuget, please let me know if you still have any issues. |
Xiaou Bijoun
X-Fleet Phantoms Care Factor
1
|
Posted - 2016.04.27 19:38:42 -
[372] - Quote
That seems to have fixed the problem with creating a ZKillboard object.
Thanks again. |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.04.27 19:41:39 -
[373] - Quote
Xiaou Bijoun wrote:That seems to have fixed the problem with creating a ZKillboard object.
Thanks again.
I will be uploading a pre-release of zkb to nuget shortly with support for the stats endpoint if you're interested :) |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.04.27 19:50:39 -
[374] - Quote
Pre-release of ZKB with stats support available here, let me know if there are any issues :) https://www.nuget.org/packages/eZet.EveLib.ZKillboard/3.0.4-beta1 |
Icahmura Hasaki
Perkone Caldari State
24
|
Posted - 2016.04.29 17:38:35 -
[375] - Quote
New version of EveCrest: https://github.com/ezet/evelib/releases/tag/EveCrest_v3.4.1
Added support for characterstats and fixed a recently introduced bug caused by a change on CCPs end.
Use crest.GetCharacterStats(id) to get stats. AggregateYears is a dictionary of ExpandoObjects as values, dynamically created at runtime. The propertynames match the json names, but are converted to PascalCase. |
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.02 18:10:58 -
[376] - Quote
EveXml: https://www.nuget.org/packages/eZet.EveLib.EveXml/3.0.8
Access masks should no longer cause integer overflows. |
Xiaou Bijoun
X-Fleet Phantoms Care Factor
1
|
Posted - 2016.05.03 18:39:38 -
[377] - Quote
Have you or are you intending on implementing the latest changes in the Citadel release?
For example the orders endpoint CCP recently added to get all orders from a region?
"Along with the buy and sell market order resources there is a new resource that gives you the both the buy and sell orders."
Thank you
|
Brain Gehirn
Reikoku Pandemic Legion
74
|
Posted - 2016.05.03 20:21:57 -
[378] - Quote
Looks like that there is a problem with the AllianceCollection. It is returning a conversion error. Looked like something about ID being Int64 but the generic collection is using the normal int (32).
I haven't had any issues with the direct conversion using the link to the alliance ID (that I am generating inside the code atm). But I probably haven't tested enough.
Let me know if you need something more specific and I will try to grab it when I get back home.
What is a signature?
|
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.03 21:23:18 -
[379] - Quote
I've seen the updates, there is quite a lot of them. I intend to add them, but not sure when I will have the time to do so at the moment.
I'll look into the AllianceCollection this weekend, I'll send you an evemail if I need more information.
I'm currently looking into converting the project to a new format, and with that I'll hopefully be able to add support for uwp/uap and other platforms. I'm also looking into creating a library for CREST using dynamic types exclusively, possibly utilizing the metadata provided by HEAD requests, which would require far less maintenance. So many ideas, and so little time.. |
Brain Gehirn
Reikoku Pandemic Legion
74
|
Posted - 2016.05.03 23:22:11 -
[380] - Quote
CREST authentication looks broken too: - Under EveAuth_Tests, methods Authenticate and Refresh are returning error HTTP Error 400. (got the same in my application)
What is a signature?
|
|
Bree Butter
Imperial Shipment Amarr Empire
0
|
Posted - 2016.05.04 09:47:32 -
[381] - Quote
Hi,
First of all, thanks for this cool library, every part has so far been working great for me. I just have one problem when deploying to my webhosting. I keep getting this error:
Access to the path '\EveLib\EveXmlCache' is denied.
I've been looking through this thread and your github pages and I've tried to change the cachefolder through my web.config as suggested:
< add key="eveLib.AppData" value="EveLib" / >
But the path is still based out of the AppData, which I dont have access to.
Ive also tried to create a new instance of the cache like so:
EveLibFileCache cache = new EveLibFileCache(Server.MapPath("~") + "\\EveLib", "LocalCache");
But this does not seem to affect the EveXml method I call afterwards.
Is there any way to force the library to use the application folder for its cache?
Thanks for your time o/ |
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.04 15:55:26 -
[382] - Quote
The cache config is a mess, on my TODO list. Try changing Config.AppData to the path you want, and remember to do so before creating your EveXml objects. |
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.04 16:48:55 -
[383] - Quote
Brain Gehirn wrote:CREST authentication looks broken too: - Under EveAuth_Tests, methods Authenticate and Refresh are returning error HTTP Error 400. (got the same in my application) Edit: Alliance error was: error invalid literal for long() with base 10: '2?' Code: crest.GetRoot().Query(r => r.Alliances).Query(o => o.Where(alliance => alliance.Id == allianceId)).FirstOrDefault(); But since I have made a change to the AllianceCollection to be able to make this query, can be that. The change is: public sealed class AllianceCollection : CollectionResource<AllianceCollection, AllianceCollection.Alliance> If you have some better alternative, let me know.
Both the refresh and authenticate methods test fine here, granted you need to update the refresh token and authcode, as they are very old.
Regarding the AllianceCollection, what did you change exactly? Did you just rename AllianceCollection.AllianceData to AllianceCollection.Alliance, or ? Are you on the newest version of EveCrest and Core ?
In any case, your query should work without making any changes, and I just tested it here without errors. Also, you should place the predicates in your call to FirstOrDefault, so the method can return when it finds your alliance. As it is, it will always scan the whole collection because of your Where clause, which could result in 12 additional needless requests.
var alliance = crest.GetRoot().Query(r => r.Alliances).Query(list => list.FirstOrDefault(a => a.Id == allianceId));
edit: Send me an evemail if you still can't figure it out, we could chat somewhere to make it a bit easier |
Bree Butter
Imperial Shipment Amarr Empire
0
|
Posted - 2016.05.04 17:44:08 -
[384] - Quote
Icahmura Hasaki wrote:The cache config is a mess, on my TODO list. Try changing Config.AppData to the path you want, and remember to do so before creating your EveXml objects.
Hi, thanks for the quick response. I've tried to change the AppData, but it won't let me because it is readonly:
http://i.imgur.com/H9GTUPo.png |
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.04 17:51:37 -
[385] - Quote
Bree Butter wrote:Icahmura Hasaki wrote:The cache config is a mess, on my TODO list. Try changing Config.AppData to the path you want, and remember to do so before creating your EveXml objects. Hi, thanks for the quick response. I've tried to change the AppData, but it won't let me because it is readonly: http://i.imgur.com/H9GTUPo.png
Which version of Core are you using? I suspect you might be using an older version?
|
Bree Butter
Imperial Shipment Amarr Empire
0
|
Posted - 2016.05.04 17:59:44 -
[386] - Quote
Ah yes, i had 3.0.2 (only downloaded it like yesterday, you work fast xD) now ive upgraded to 3.0.7 and appdata can be set now, now i just need to figure out why it says that it cant find the cachefactory field |
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.04 18:04:31 -
[387] - Quote
If you're referring to CachePath, it's been converted form a field to a property, so you would need to recompile. I can't imagine you should need to set that property tho, instead set AppData to where you want the cache folder to be created. |
Icahmura Hasaki
Perkone Caldari State
25
|
Posted - 2016.05.04 18:10:12 -
[388] - Quote
New version of EveCrest: https://www.nuget.org/packages/eZet.EveLib.EveCrest/3.4.2 Notes: https://github.com/ezet/evelib/releases/tag/EveCrest_v3.4.2
Added support for the new combined MarketOrder resource, since that was a quick fix.
The other new endpoints might take a little longer. If anyone has specific requests for an endpoint they need, please let me know and I'll find some time :) |
Bree Butter
Imperial Shipment Amarr Empire
0
|
Posted - 2016.05.04 18:18:40 -
[389] - Quote
Ive gotten it to work, thanks! |
Brain Gehirn
Reikoku Pandemic Legion
74
|
Posted - 2016.05.04 22:49:53 -
[390] - Quote
Your answer gave me a direction for now (my source was not using AllianceData just the old href thing). My visual studio wasn't updating things as I thought.
I will do my merge + tests again.
What is a signature?
|
|
|
|
|
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 .. 15 :: one page |
First page | Previous page | Next page | Last page |