EVE-SECURE / eve-net

Automatically exported from code.google.com/p/eve-net
0 stars 0 forks source link

IsCorpKey not working => APIKeyInfo doesn't parse "type" properly #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Replace "foo" and "bar" with a corp api key and vcode
// This is what the source does to find out if it's a corp key
            APIKeyInfo apikey = new APIKeyInfo("foo", "bar");
            apikey.Query();

            bool isCorpKey = (!String.IsNullOrEmpty(apikey.type) && String.Compare(apikey.type, "Corporation", StringComparison.OrdinalIgnoreCase) == 0);
// check the result, find that it is actually null or empty
            System.Windows.Forms.MessageBox.Show(apikey.type);
            return;

Sample XML:
<eveapi version="2">
<currentTime>2014-11-09 22:16:07</currentTime>
<result>
<key accessMask="67108863" type="Corporation" expires="">
<rowset name="characters" key="characterID" 
columns="characterID,characterName,corporationID,corporationName,allianceID,alli
anceName,factionID,factionName">
<row characterID="REDACTED" characterName="REDACTED" corporationID="REDACTED" 
corporationName="REDACTED" allianceID="0" allianceName="" factionID="0" 
factionName=""/>
</rowset>
</key>
</result>
<cachedUntil>2014-11-09 22:21:07</cachedUntil>
</eveapi>
What is the expected output? What do you see instead?
isCorpKey should be true, and apikey.type should be "Corporation"

What version of the product are you using? On what operating system?
.NET 4.0 / Windows 7

Original issue reported on code.google.com by sparog.t...@gmail.com on 9 Nov 2014 at 10:20

GoogleCodeExporter commented 9 years ago
Please delete this issue. I found a typo in how I was using the library which 
was causing the problem. After fixing the typo everything is working as 
intended.

Original comment by sparog.t...@gmail.com on 9 Nov 2014 at 11:29