For a start, then:
42. Feed cookies and chocolate and bacon sandwiches, or a bacon-chocolate-cookie-sandwich to the guy who will own this API.
This is to solve the problem of suffering, missery and everything, and from there:
-------------------------------------------------------
Access patterns/considerations:
1. Long-half-life data:
Much of your data (System names, Item Names, etc) is likely to have a long half time. I'd like to see this data provisioned as static content in more than one format (but that's because I've done this before for an MMO).
Some folks will want XML and some will want JSON and some will want JS and some will want CSV. For the static portion of the content, you can refresh this periodically - probably at patch time, and by serving it as static content you can encourage API consumers to use HEAD requests. And if you cap this off with an index, then you can facilitate a single
HEAD /api/content.csv
If it hasn't changed, you don't have to fetch any of the static content.
I personally would prefer the data to be in either terse json format or csv. I'm sure some people will want XML because they hate bandwidth, but those are also the guys most likely to do things like HEAD requests and actually try to avoid downloading everything every time in the first place.
2. Maintaining the spirit of discovery:
I'm about to ask you to expose a lot of your data, but that doesn't mean you have to put on an apron and answer to "Garcon".
There are a number of crowd-sourcing projects going on now to try and gather data from the ED universe. The main problem with these is a lack of authority for the data.
Perhaps in the future, when X% of the data has been discovered, you can expose more data, but I think to start with the most helpful thing would be an API which connects
with the game by requiring you to - at the very least - discover systems.
To achieve this, some form of "EDGUID" (Elite Dangerous Globally Unique ID) which you can only retrieve from in-game. Provide an SLA that for a given star, any name or position changes will not result in a change of EDGUID and you establish the all-important COA.
Your API would then require users to refer to a System by it's EDGUID
and it's name stripped of any punctuation or spaces:
/api/system/AAX-192-KYW-929-A08/luytensstar/
You've got two factor authentication to prohibit crawling sufficiently long for you to catch anyone trying to do it, and player's - and thus third party tools - can only obtain this data as their users actually play the game.
Beyond that, for now, I think the main things I would love to have available for my trade database/profit optimizer:
a- List of Item Categories (perhaps by language):
[ identifier, name ]
b- List of Standard Tradeables (excluding rares, is fine):
[ identifier, category, name ]
c- List of Player Ships
[ identifier, name, cost, blurb ]
d- List of "Public" System EDGUIDs and Names
[ "AAX-192-KYW-929-A08", "Luyten's Star" ]
e- System information:
/api/system/<EDGUID>/<strippedname>
[ proper name, "blurb", galactic coordinates, permit (y/n) ]
f- Station information:
/api/station/<EDGUID of System>/<stripped station name>
[ proper name, faction ]
I suspect at some point the star data will need to be compartmentalized into quadrants (40x40x40ly) to discourage people from writing apps that start with requests.get("/api/all-dem-stars.2gb.xml")...
So - here I am, the author of a trading tool, and ... I'm not asking you for all kinds of data.
The data I am asking for would allow my users to have a solid foundation for the data they are gathering, sharing, co-operating on, with plenty of motivation to continue exploring and playing. That core, things like item names etc, is just the static data that doesn't detract from the game by being exposed. The availability of coordinates and names for Systems means that where users choose to collaborate, they don't have to get bent out of shape because I, for example, am a baked-in C64 Monty Mole fan and I can't type "Ron Hubbard" for the life of me (apologies to everyone being misdirected to Rob Hubbard Port).
The co-ordinates are used in my tool for finding nearby stars, calculating jump routes, or finding "stars within X jumps of system X at a maximum of Yly per jump".
Code:
import tradedb
tdb = tradedb.TradeDB()
# Lookup "The Ascending Phoenix" in Chi Eridani
start = tdb.lookupPlace("chi/ascendingph")
# Find the route to lave with a 16.11ly jump limit
lave = tdb.lookupPlace("lave")
route = tdb.getRoute(start, lave, 16.11)
# Get a list of stations within 5 x 19.5 jumps
# only include stations paying for something
# sold here, where paying > buying
# and don't go to lave, that place sucks.
trading = tdb.getDestinations(
start,
maxJumps=5, maxLyPer=19.5,
avoidPlaces=[lave],
trading=True,
maxPadSize='ML', # medium or large pads only
)
Right now, all of the data is user-supplied (system names, coordinates; station names, coordinates, black market, pad size, ls from star; trade prices). A chunk of my users are running their own, private, stand-alone database; many others are using 3rd-party crowd sourcing projects (maddavo's site, EDDN).
So, yeah, a part of me would love to say "can I have a way to get price data from X hours ago as 'backfill' material" or "it would be great if you could tell us the max pad size of stations" but I think it's better for the game that we don't have that for now. I think having the foundation of system and star data, gated by discovery, is far better for the game.
I'm pretty sure some TradeDangerous users won't thank me for this, but I value the game first and foremost over the tool I've written for it
[I should point out: TD has a number of commands dealing with finding missing/old/ambiguous data and a lot of my users thus use the crowd-source project as a way to supplement the mission system and add value to the game for themselves]
Perhaps you might consider exposing some additional data as seeing material, the way you initially exposed a number of systems names/coordinates, you might have a small number of systems for which you expose additional data, in which case the values I'd most want access to are:
. System:
- Permits required,
- Number of stations,
. Station:
- Orbit (I'm not interested in 2 hour flights),
- Type,
- Max Pad Size (so I know if I can land there),
- Has black market,
. Trades:
- Items sold by station,
- Items bought by station,
You might even consider something like a 12hr average price for the listed items for those stations.
This is only some of the data I'm already gathering (we also record the units and level), and it allows me to figure out where I can buy or sell items for missions, allowing for things like how big my ship is, whether the goods I have are illegal.
It lets me figure out what's likely to be a good haul between two systems, even if there are a number of jumps required between them, although I should point out that it is absolutely not guaranteed to do so because even if I had "live" data it cannot preempt the actual travel time of getting cargo from A to B.
Hope this is in line with what you were looking for in terms of feedback.