public async Task <IEnumerable <MailBody> > GetMailBodyAsync(CharacterSpecificApiKey apiKey, long messageId) { var result = await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, EveXmlSpecializedCollectionCacheAgent <MailBodyCollection>, MailBodyCollection>( $"{this.Server.XMLApi}char/MailBodies.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}&IDs={messageId}"); return(result.Items); }
public async Task <IEnumerable <SkillQueue> > GetSkillQueueAsync(CharacterSpecificApiKey apiKey) { var result = await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, EveXmlSpecializedCollectionCacheAgent <SkillQueueCollection>, SkillQueueCollection>( $"{this.Server.XMLApi}char/SkillQueue.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}"); return(result.Items); }
public async Task <IEnumerable <MailMessageItem> > GetMailMessagesAsync(CharacterSpecificApiKey apiKey) { var result = await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, MailMessageCollection>( $"{this.Server.XMLApi}char/MailMessages.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}"); return(result.Items.Where(x => x.SenderId != apiKey.CharacterId)); }
public async Task <IEnumerable <Notification> > GetNotificationsAsync(CharacterSpecificApiKey apiKey) { var result = await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, NotificationCollection>( $"{this.Server.XMLApi}char/Notifications.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}"); return(result.Items.Where(x => !x.IsRead)); }
public async Task <double> GetEstimatedCharacterValue(CharacterSpecificApiKey apiKey) { var characterSheet = await this.GetCharacterSheetAsync <CharacterSheet>(apiKey); return((((DateTime.Now - characterSheet.DayOfBirth).TotalDays / 365.2425) * (this.GetItemAveragePrice(29668) / 3)) + (characterSheet.Skills.Sum(x => x.Skillpoints) / 500000 * this.GetItemAveragePrice(40520))); }
public async Task <ReadOnlyDictionary <long, AssetItem> > GetAssetsAsync(CharacterSpecificApiKey apiKey) { var result = await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, EveXmlSpecializedCollectionCacheAgent <AssetItem>, AssetItemCollection>( $"{this.Server.XMLApi}char/AssetList.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}"); return(result.Items.ToDictionary(x => x.ItemId).AsReadOnly()); }
public async Task <double> GetEstimatedAssetValue(CharacterSpecificApiKey apiKey) { await this.CachePriceAsync(); var assets = await this.GetAssetsAsync(apiKey); return(assets .Where(x => !x.Value.IsBlueprintCopy && !x.Value.IsCapsule && !x.Value.IsHiddenModifier && !x.Value.IsSkill) .Select(x => new { Price = this.GetItemPrice(x.Value.TypeId)?.AveragePrice }) .Where(x => x.Price.HasValue) .Select(x => x.Price.Value) .Sum(x => x)); }
public async Task <SkillInTraining> GetSkillInTrainingAsync(CharacterSpecificApiKey apiKey) { return(await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, EveXmlSpecializedCacheAgent <SkillInTraining>, SkillInTraining>( $"{this.Server.XMLApi}char/SkillInTraining.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}")); }
public async Task <T> GetCharacterSheetAsync <T>(CharacterSpecificApiKey apiKey) where T : CharacterSheetCompact, new() { return(await WebServiceConsumer.Consume <DefaultRestClient, XmlDeserializer, EveXmlSpecializedCacheAgent <T>, T>( $"{this.Server.XMLApi}char/CharacterSheet.xml.aspx?keyId={apiKey.KeyId}&vCode={apiKey.VerificationCode}&characterID={apiKey.CharacterId}")); }