Giter Site home page Giter Site logo

evelib's Introduction

evelib's People

Contributors

ajni avatar beanheadza avatar bensho avatar crustyjew avatar ezet avatar joeeigel avatar kid avatar nathan-bell avatar trodery avatar xeltor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evelib's Issues

Industry Team Workers

The Worker Bonus value is always set to ME even if the worker is providing a TE bonus

MarketId should be long instead of int

/// Gets or sets the order identifier.
///
/// The identifier.
[DataMember(Name = "id")]
public new long Id { get; set; }

added this to the "EveLib.EveCrest\Models\Resources\Market\MarketOrder.cs" file.
Without this he tries to get using a 'normal' int and doesnt work.

Industry Specialties

In EveLib.EveCrest you are missing the DataMember attribute on the CrestIndstrySpecialities model.

[DataMember(Name = "items")]

Needs to be added to Specializations

Zkillboard FinalBlow bool convert bug

var api = new ZKillboard();
var options = new ZKillboardOptions();
options.Limit = 1;
options.WSpace = true;
try
{
ZkbResponse response = api.GetKills(options);
}
catch (Exception ex)
{
}

This always throws a Newtonsoft.Json.JsonSerializationException "Error converting value "1" to type 'System.Boolean'. Path '[0].attackers[0].finalBlow', line 1, position 642." I've dug into it, & it seems that the deserializer should be setting the property "FinalBlowString" of the "ZkbAttacker" object (which then sets the bool "FinalBlow", but something isn't mapping "finalBlow" in the Json to the DataMember "finalBlow" (which is attached to the property "FinalBlowString"). Does anyone else see this, or have any pointers?

EveCrest with refresh token causes 500 errors

Plugging in a refresh token and application key into the EveCrest constructor results in getting 500s back.

This may be because I have a nonsense callback registered for my application with CCP. While I'm not completely clear on the SSO implementation, it seems like following the redirect is unnecessary to obtain an authentication token. If that is causing the 500s, it seems this could be a problem for desktop applications where a callback URL makes no sense.

EveStaticData: GroupId of invType is 0

Hi!
I need to get GroupId of bluebprunt, so I'm using the following code:

var estd = new EveStaticData();
var invType = estd.GetInvType(bp.TypeId);

But after request is finished invType.GroupId is 0, but invType.Group has a valid URL to element-43.com API endpoint.

EveCentral: MarketCentral HourLimit/QuantityLimit Bug

Not sure what the problem is. I set either the region or the system (but not both) in the first Select Case, and all the BuyOrders and SellOrders values in response.Result.Item(0) are zero. Here's the code if that will help:

``
Public Function GetPrice(mat As cMaterial) As Double

    Dim options As New EveCentralOptions() With {.HourLimit = HourLimit, .MinQuantity = MinQuantity}
    options.Items.Add(mat.TypeID) 'add the material's type id 
    Dim EveCentral = New EveCentral()

    Select Case ItemType 'this is an enum value; value is property of this class

        Case eSystemType.REGION
            options.Regions.Add(ItemID)
        Case eSystemType.SOLARSYSTEM
            options.System = ItemID

    End Select


    Dim response As EveCentralModule.Models.MarketStatResponse = EveCentral.GetMarketStat(options)

    Select Case TypeTransaction ' this is an enum value; value is property of this class

        Case eTransaction.BUY

            Select Case TypePrice ' this is an enum value; value is property of this class

                Case ePrice.AVG
                    Return response.Result.Item(0).BuyOrders.Average
                Case ePrice.MAX
                    Return response.Result.Item(0).BuyOrders.Max
                Case ePrice.MIN
                    Return response.Result.Item(0).BuyOrders.Min

            End Select

        Case eTransaction.SELL

            Select Case TypePrice

                Case ePrice.AVG
                    Return response.Result.Item(0).SellOrders.Average
                Case ePrice.MAX
                    Return response.Result.Item(0).SellOrders.Max
                Case ePrice.MIN
                    Return response.Result.Item(0).SellOrders.Min

            End Select

    End Select

End Function

``

CREST exception handling

Handle exceptions for the CREST api properly.
Exceptions:
{
"message": "Problem communicating with the EVE proxies",
"key": "badGateway",
"exceptionType": "BadGatewayError"
}

Attributes from CharacterSheet

Attributes on Charactersheet do not work.
Please add following to CharacterSheet.cs in Models.Character

line 116: Attributes = xml.deserialize("attributes");

line 170: [XmlRoot("attributes")]

and correct line 184. Willpower is mispelled.
.

Typo in XmlAttribute for NewIndustryJob for the new SiSi Industry request

in NewIndustryJobs.cs the 2nd XmlAttribute has to read like this:
[XmlAttribute("installerID")]
public long InstallerId { get; set; }

and not like currently:
[XmlAttribute("installedID")]
public long InstallerId { get; set; }

further the location variables and I think a couple of other IDs should be long and not int as they overflow.

Don't have the complete request working yet. So some more items seem to be hiding somewhere

allianceName

If a Corporation is not in an Alliance the CharacterSheet fails to create an xml

        AllianceName = getString("allianceName");
        AllianceId = getLong("allianceID");

Remove the

0
from your test and we shall see.

Thanks for the awesome Lib btw!

AccountStatus/MultiCharacterTraining node is not implemented correctly [Solution attached]

I rewrote the affected code section and include it here for review and incorporation into the source.

public class AccountStatus {
    /// <summary>
    ///     Gets PaidUntil
    /// </summary>
    /// <value>The paid until.</value>
    [XmlIgnore]
    public DateTime PaidUntil { get; private set; }

    /// <summary>
    ///     Gets or sets PaidUntil as a string
    /// </summary>
    /// <value>The paid until as string.</value>
    [XmlElement("paidUntil")]
    public string PaidUntilAsString {
        get { return PaidUntil.ToString(XmlHelper.DateFormat); }
        set { PaidUntil = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
    }

    /// <summary>
    ///     Gets CreationDate
    /// </summary>
    /// <value>The creation date.</value>
    [XmlIgnore]
    public DateTime CreationDate { get; private set; }

    /// <summary>
    ///     Gets or sets CreationDate as a string
    /// </summary>
    /// <value>The creation date as string.</value>
    [XmlElement("createDate")]
    public string CreationDateAsString {
        get { return CreationDate.ToString(XmlHelper.DateFormat); }
        set { CreationDate = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
    }

    /// <summary>
    ///     Gets or sets LogonCount
    /// </summary>
    /// <value>The logon count.</value>
    [XmlElement("logonCount")]
    public int LogonCount { get; set; }

    /// <summary>
    ///     Gets or sets LogonMinutes
    /// </summary>
    /// <value>The logon minutes.</value>
    [XmlElement("logonMinutes")]
    public int LogonMinutes { get; set; }

    /// <summary>
    ///     Gets or sets the MultiCharacterTraining row set
    /// </summary>
    /// <value>The multi character training.</value>
    [XmlElement("rowset")]
    public EveXmlRowCollection<MultiCharacterTraining> MultiCharacterTraining { get; set; }
}


/// <summary>
///     Multi Character Training
/// </summary>
[Serializable]
[XmlRoot("row", IsNullable = false)]
public class MultiCharacterTraining {
    /// <summary>
    ///     Gets or sets TrainingEnd
    /// </summary>
    /// <value>The training end.</value>
    [XmlIgnore]
    public DateTime TrainingEnd { get; set; }

    /// <summary>
    ///     Gets or sets TrainingEnd as a string
    /// </summary>
    /// <value>The training end date as string.</value>
    [XmlAttribute("trainingEnd")]
    public string TrainingEndAsString {
        get { return TrainingEnd.ToString(XmlHelper.DateFormat); }
        set { TrainingEnd = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
    }
}

GetWars pagination bug

GetWars method doesn't pass the page though to the GetWarsAsync method, so always return page 1.

Encoding Errors on CacheFile

Additional Changes to encoding needed in AsyncFileUtilities.cs

Functions WriteAllTextAsync, ReadAllTextAsync still expect unicode encoding.

Add support for public CorporationSheet

Having an issue getting the public CorporationSheet data (no ApiKey required). Currently, the only way I see to get access to the corporation data is to create a new corporation:

var corp = new Corporation(new CorporationKey(0, ""), 1000009);

I don't have a key for the corporation and don't need it because I only need the public data.

Anyone have a workaround that doesn't involve me creating my own code to bring down and deserialize the XML?

AppData path in Core.Config is readonly

It is not possible to change the AppData Path in Config, therefore the lib will not run on webservers.
It would be better design, to implement a property with a setter which will reinitialise the inherited paths on change.

CREST /industry/systems/ has a different format

Hi,

not sure whether the CrestIndustrySystems.cs format was changed by CCP or not, however the one on git doesn#t work. I left the old code commented out in the following code to have a reference. The new one works as of right now:

using System.Collections.Generic;
using System.Runtime.Serialization;

namespace eZet.EveLib.Modules.Models
{
    /// <summary>
    /// Represents the response for Industry Systems in CREST
    /// </summary>
    [DataContract]
    public class CrestIndustrySystems : CrestCollectionResponse
    {
        [DataMember(Name = "items")]
        public List<SolarSystemEntry> SolarSystems { get; set; }



        [DataContract]
        public class SolarSystemEntry
        {

            /// <summary>
            /// The solar system
            /// </summary>
            [DataMember(Name = "solarSystem")]
            public CrestNamedEntity SolarSystem { get; set; }

            /// <summary>
            /// A list of system costs
            /// </summary>
            [DataMember(Name = "systemCostIndices")]
            public List<SystemCostEntry> SystemCostIndices { get; set; }
        }

        [DataContract]
        public class SystemCostEntry 
        {
            /// <summary>
            /// The cost index
            /// </summary>
            [DataMember(Name = "costIndex")]
            public decimal CostIndex { get; set; }

            /// <summary>
            /// The activity ID
            /// </summary>
            [DataMember(Name = "activityID")]
            public int ActivityId { get; set; }

            /// <summary>
            /// The activity name
            /// </summary>
            [DataMember(Name = "activityName")]
            public string ActivityName { get; set; }

        }

        /*
        /// <summary>
        /// The solar system
        /// </summary>
        [DataMember(Name = "solarSystem")]
        public List<SolarSystemEntry> SolarSystems { get; set; }

        /// <summary>
        /// Represesents a solar system for a SystemCostEntry
        /// </summary>
        [DataContract]
        public class SolarSystemEntry
        {

            /// <summary>
            /// The solar system
            /// </summary>
            public CrestNamedEntity SolarSystem { get; set; }

            /// <summary>
            /// A list of system costs
            /// </summary>
            public List<SystemCostEntry> SystemCostIndices { get; set; }

        }

        /// <summary>
        /// Represents a system cost index in CREST Industry Systems collection
        /// </summary>
        [DataContract]
        public class SystemCostEntry : CrestNamedEntity
        {
            /// <summary>
            /// The cost index
            /// </summary>
            [DataMember(Name = "costIndex")]
            public float CostIndex { get; set; }

            /// <summary>
            /// The activity ID
            /// </summary>
            [DataMember(Name = "activityID")]
            public int ActivityId { get; set; }

            /// <summary>
            /// The activity name
            /// </summary>
            [DataMember(Name = "activityName")]
            public string ActivityName { get; set; }

        }
         */
    }
}

EveWho 'GetCorporationMembers' Does not deseralize 'characters'

When calling EveWho.GetCorporationMembers(id) the result returns as expected however the 'Members' property is null.

I have traced this through to EveLib.Core.Serializer and it is reciving proper JSON

"{\"info\":{\"corporation_id\":\"869043665\",\"name\":\"Woopatang\",\"memberCount\":\"52\"},\"characters\":[{\"character_id\":\"149932493\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Agamemon\"},{\"character_id\":\"90464284\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Aidera Boirelle\"},{\"character_id\":\"490145331\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Aqiz\"},{\"character_id\":\"483755227\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Arnel Aalske\"},{\"character_id\":\"703536738\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Barlas\"},{\"character_id\":\"1353745649\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Barnaby Jones\"},{\"character_id\":\"93284841\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Bartamaeus\"},{\"character_id\":\"94481757\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Brick Mouth\"},{\"character_id\":\"1279716635\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Dajee\"},{\"character_id\":\"1659526669\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Dark Magister\"},{\"character_id\":\"90147481\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Davetronicat\"},{\"character_id\":\"961754162\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Eibrag\"},{\"character_id\":\"92484975\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"elvin en Tilavine\"},{\"character_id\":\"91295798\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Farrokh Bulsarra\"},{\"character_id\":\"857061884\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Garbie\"},{\"character_id\":\"1139849922\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Garrin Lasyn\"},{\"character_id\":\"94481831\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"GateIsRed\"},{\"character_id\":\"971618108\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"GeneralDisarray\"},{\"character_id\":\"94474585\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Gideon Manasseh\"},{\"character_id\":\"220886364\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Guru\"},{\"character_id\":\"90014980\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Henryetta Jones\"},{\"character_id\":\"978072725\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Imskered\"},{\"character_id\":\"92061270\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Jedd I Knight\"},{\"character_id\":\"881773792\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Jonii\"},{\"character_id\":\"254971697\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Jumpy Mcchicken\"},{\"character_id\":\"94146087\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Kal Darksilver\"},{\"character_id\":\"270011443\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Kal'enedral Quicksilver\"},{\"character_id\":\"603359972\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Kernel Dagger\"},{\"character_id\":\"764600701\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Kernel Hauler\"},{\"character_id\":\"90370369\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Kreis Legatis\"},{\"character_id\":\"240048590\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Locodekanko\"},{\"character_id\":\"304901755\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Loot42\"},{\"character_id\":\"1788292390\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Marros Thiben\"},{\"character_id\":\"372069624\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Nafai Wiggin\"},{\"character_id\":\"717612139\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Parnassus\"},{\"character_id\":\"400154940\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Piratez Rock\"},{\"character_id\":\"1043953065\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Premier Starr\"},{\"character_id\":\"1134904256\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Psyching\"},{\"character_id\":\"475122547\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Rade De'Wrath\"},{\"character_id\":\"471211168\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Rayzth\"},{\"character_id\":\"1478139842\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Reglus\"},{\"character_id\":\"508890118\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Rotundra Jones\"},{\"character_id\":\"90380036\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Rush Millenial\"},{\"character_id\":\"198409206\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Scabies Malous\"},{\"character_id\":\"894351737\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Siddalee\"},{\"character_id\":\"214129738\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Smutt Peddler\"},{\"character_id\":\"1633218082\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Squizz Caphinator\"},{\"character_id\":\"1126608741\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Thendara Darkover\"},{\"character_id\":\"1065396652\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Woopatang Holdings\"},{\"character_id\":\"1125184784\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Xaarous\"},{\"character_id\":\"91259668\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Xenner Amatin\"},{\"character_id\":\"500268324\",\"corporation_id\":\"869043665\",\"alliance_id\":\"0\",\"name\":\"Zaand\"}]}"

However when JsonConvert.DeserializeObject(data, new IsoDateTimeConverter { DateTimeFormat = DateFormat }); is called it returns expected results with the exception of Members being null.

The 'Member' property is mapped to the data member "characters" in the CorporationMembers.cs Model:

[DataMember(Name = "characters")]

In review of the JSON string this seems to be because the "Info" object returned by the EveWho API now has the 'characters' object fall outside of the 'info' object.

By adding a DataMember for characters to the EveWhoResponse Model we can retrieve the characters.

Unit Tests not passing

Hi - I am new to this repo. I am not sure if this is the right place to ask for help? I just cloned and built the solution. I ran all the unit tests and 49 to 50 are failing. There are some common causes of failure:

  • Authenticate gets System.Net.WebException: The remote server returned an error: (400) Bad Request.
  • Many others get eZet.EveLib.EveXmlModule.Exceptions.EveXmlException: Key has expired. Contact key owner for access renewal. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
  • And eZet.EveLib.EveCrestModule.Exceptions.EveCrestException: This is not third party enabled... yet ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
  • System.NullReferenceException: Object reference not set to an instance of an object. (I expect these are related to above failures)

Any help or tips would be much appreciated.

Cheers,
Scott

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.