APIv2 Corp AssetList XML

From EVEDev
Jump to: navigation, search
Api.pngAPI Methods - Category Home - API Overview - API Page Index - API Libraries - API Wanted Features

Contents

/corp/AssetList.xml.aspx

See Character Assets for the full description of the assets list.

officeID to stationID conversion

To convert locationIDs greater than or equal to 66000000 and less than 67000000 to stationIDs from staStations subtract 6000001 from the locationID. To convert locationIDs greater than or equal to 67000000 and less than 68000000 to stationIDs from ConquerableStationList subtract 6000000 from the locationID. More Info can be found at this thread

locationID to StationID/itemID conversion

The locationID is not always an officeID (for example, when you never had an office there, but have items in the Deliveries area for items bought/sold (flag=62). In cases like these the officeID to stationID conversion above will not always work. There is a small group of dbo.staStations.stationID mapReferences, or locationID's that are part of the ConquerableStationList and less than the 61000000 base for Player Outposts.

Basically, when 60000000 < locationID <61000000 the mapReference (eveName, mapDenormailze, staStations) will give you the name of the object. The exception is the range 60014861 through (including) 60014928. This is the range of stationID's that are actually the conquerableStations that pre-date player Outposts. When the locationID is greater than or equal to 66000000 the the officeID conversion works. When the locationID is greater than 61000000 and less than 66000000 then it is a ConquerableOutpost. When the locationID < 60000000 then the asset is somewhere in space - I have only seen solarSystem numbers.

SQL

 
SELECT case
  when a.locationID BETWEEN 66000000 AND 66014933 then
    (SELECT s.stationName FROM dbo.staStations AS s
      WHERE s.stationID=a.locationID-6000001)
  when a.locationID BETWEEN 66014934 AND 67999999 then
    (SELECT c.stationName FROM api.ConqStations AS c
      WHERE c.stationID=a.locationID-6000000)
  when a.locationID BETWEEN 60014861 AND 60014928 then
    (SELECT c.stationName FROM api.ConqStations AS c
      WHERE c.stationID=a.locationID)
  when a.locationID BETWEEN 60000000 AND 61000000 then
    (SELECT s.stationName FROM dbo.staStations AS s
      WHERE s.stationID=a.locationID)
  when a.locationID>=61000000 then
    (SELECT c.stationName FROM api.ConqStations AS c
      WHERE c.stationID=a.locationID)
  else (SELECT m.itemName FROM dbo.mapDenormalize AS m
    WHERE m.itemID=a.locationID) end
AS location,a.locationId AS locID FROM aleAssetItems AS a
GROUP BY a.locationID;
 

This works in MySQL 5.0 for me anyway.

Note that dbo.eveNames can be used in place of dbo.mapDenormalize

Ideas for usage

Please see the discussion for some ideas for using this info in your corp/alliance.

Notes

Returns API error 209 'Character must be a Director or CEO.' for characters in NPC corporations.

Personal tools