ezet / evelib

Eve Online Library.NET is an open source C# wrapper for CCPs Eve Online API and other popular Eve Online APIs.
Apache License 2.0
72 stars 36 forks source link

Typo in XmlAttribute for NewIndustryJob for the new SiSi Industry request #12

Closed Zoriander closed 10 years ago

Zoriander commented 10 years ago

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

ezet commented 10 years ago

It's very late here, I'll have it fixed tomorrow. Thanks for the bug report! :+1:

ezet commented 10 years ago

Fixed. Have you changed the base url for the entity to the test server? The request should work even without this fix, unless you are requesting from the current live server, since this endpoint isn't available there yet. To test it with the test server, use .BaseUri = "https://api.testeveonline.com"; on the key or character before using it.

Zoriander commented 10 years ago

thanks for the prompt response - did some more digging this evening as for me the xml deserialization failed (and yes, I use the SiSi API). The error is in the dates causing a System.FormatException with a non valid AllXsd value. So you have to do the same as you used in other parts of the code and replace: [XmlAttribute("startDate")] public DateTime StartDate { get; set; }

        [XmlAttribute("endDate")]
        public DateTime EndDate { get; set; }

        [XmlAttribute("pauseDate")]
        public DateTime PauseDate { get; set; }

        [XmlAttribute("completedDate")]
        public DateTime CompletedDate { get; set; }

with [XmlIgnore] public DateTime StartDate { get; private set; }

        [XmlAttribute("startDate")]
        public string StartDateAsString
        {
            get { return StartDate.ToString(XmlHelper.DateFormat); }
            set { StartDate = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
        }

        [XmlIgnore]
        public DateTime EndDate { get; private set; }

        [XmlAttribute("endDate")]
        public string EndDateAsString
        {
            get { return EndDate.ToString(XmlHelper.DateFormat); }
            set { EndDate = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
        }

        [XmlIgnore]
        public DateTime PauseDate { get; private set; }

        [XmlAttribute("pauseDate")]
        public string PauseDateAsString
        {
            get { return PauseDate.ToString(XmlHelper.DateFormat); }
            set { PauseDate = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
        }

        [XmlIgnore]
        public DateTime CompletedDate { get; private set; }

        [XmlAttribute("completedDate")]
        public string CompletedDateAsString
        {
            get { return CompletedDate.ToString(XmlHelper.DateFormat); }
            set { CompletedDate = DateTime.ParseExact(value, XmlHelper.DateFormat, null); }
        }

by doing it this works ;-)

still I'm missing a call now with new API to read the ME status - do you have any idea how I can read that out on historic data?

and one more suggestion on the AssetList class (sorry to just throw it in here): you can add [XmlAttribute("rawQuantity")] public int RawQuantity { get; set; } // with blueprint: -1 = original; -2= copy; otherwise -1 for singelton this one was added sometime after v2 of the API to distinguish the BPOs from the BPCs

ezet commented 10 years ago

I've pushed a fix for this to git. I haven't been able to test this endpoint at all in fact, since I don't have access to sisi or industry. If you could share a copy/paste of the xml output that would be great. About the location IDs, are you sure they overflow? From what I can remember there were only 500k rows or so.

Zoriander commented 10 years ago

Hi, I'm on a business trip right now, but will send later. I'm sure the facilityID overflowed as that was one of the first items I saw. For the locacationId thrre are high values for conquerable stations. I can send the values later. I just remember I had to change to long at some time ago with the lib I used so far. With the changes I got the module working before I posted. One other thing. Would be good to have a try catch in the rowcollection routine that deserializes the xmls. And then trace it. Right now it crashes with above topic C u later

Stephan

Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet. Lars Kristian Dahl notifications@github.com schrieb:

  I've pushed a fix for this to git. I haven't been able to test this endpoint at all in fact, since I don't have access to sisi or industry. If you could share a copy/paste of the xml output that would be great. About the location IDs, are you sure they overflow? From what I can remember there were only 500k rows or so.

  —
  Reply to this email directly or view it on GitHub.
ezet commented 10 years ago

Changed relevant int types to long.