These forums have been archived and are now read-only.
The new forums are live and can be found at https://forums.eveonline.com/
[EveLib] A .NET library for EveXML, CREST, EveCentral, and more
Developer of EveLib and EveAuthUtility
var theForgeMarketOrders = await(await(await(await crest.GetAsync(crest.Host)) .GetAsync(r => r.regions)) .GetAsync(a => a.First(o => o.id == 10000002))) .GetAsync(r => r.marketOrdersAll);
foreach (var marketOrder in theForgeMarketOrders) { MarketOrder temp = new MarketOrder(); temp.buy = marketOrder.buy; temp.issued = marketOrder.issued; temp.price = marketOrder.price; temp.volume = marketOrder.volume; temp.duration = marketOrder.duration; temp.id = marketOrder.id; temp.minVolume = marketOrder.minVolume; temp.volumeEntered = marketOrder.volumeEntered; temp.range = marketOrder.range; temp.stationID = marketOrder.stationID; temp.type = marketOrder.type; MarketOrders.Add(temp); }
Test method eZet.EveLib.Test.EveCrest_Public_Tests.GetRoot threw exception: Newtonsoft.Json.JsonSerializationException: Error converting value "online" to type 'eZet.EveLib.EveCrestModule.Models.Resources.CrestRoot+ServerStatus'. Path 'serviceStatus', line 1, position 1980. --- System.ArgumentException: Could not cast or convert from System.String to eZet.EveLib.EveCrestModule.Models.Resources.CrestRoot+ServerStatus. at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType) at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) --- End of inner exception stack trace --- at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at eZet.EveLib.Core.Serializers.JsonSerializer.eZet.EveLib.Core.Serializers.ISerializer.Deserialize[T](String data) in D:\Downloads\evelib-master\EveLib.Core\Serializers\JsonSerializer.cs:line 73 at eZet.EveLib.EveCrestModule.RequestHandlers.CachedCrestRequestHandler.GetAsyncd__53`1.MoveNext() in D:\Downloads\evelib-master\EveLib.EveCrest\RequestHandlers\CachedCrestRequestHandler.cs:line 260--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at eZet.EveLib.EveCrestModule.EveCrest.getAsyncd__121`1.MoveNext() in D:\Downloads\evelib-master\EveLib.EveCrest\EveCrest.cs:line 1028--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at eZet.EveLib.EveCrestModule.EveCrest.GetRootAsyncd__82.MoveNext() in D:\Downloads\evelib-master\EveLib.EveCrest\EveCrest.cs:line 561--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at eZet.EveLib.Test.EveCrest_Public_Tests.GetRootd__6.MoveNext() in D:\Downloads\evelib-master\EveLib.Tests\EveCrest_Public_Tests.cs:line 43--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
var regionId = 10000002;var typeId = 34;var crest = new DynamicCrest();var root = await crest.GetAsync(crest.Host);var regions = await root.GetAsync(r => r.regions);var tmpRegion = await regions.GetAsync(a => a.FirstOrDefault(o => o.id == regionId));//here it fails since it needs typeId somehow...var tmpHistory = await tmpRegion.GetAsync(h => h.marketHistory);
var itemUrl = "https://crest-tq.eveonline.com/types/589/";var tmpHistory = await tmpRegion.GetAsync(h => h.marketHistory, "type", itemUrl);
var root = await crest.GetAsync(crest.Host);