evewarfare.com has some code that takes the name of a Station input into Slack and fetches market data about that station. It does this by:
- Using the search resource to get the id of the station
- Using the station resource to get the id of the constellation
- Using the constellation resource to get the id of the region
- Using the market resource to get data about the market
- Filtering that data down to just data about the station id
I’d love to do the same for structures (and it looks like I could cut out steps 2 and 3 for structures as you can fetch the market data directly from a structure id), but I can’t figure out a way to get from the structure name to the structure id.
Suggestions? My current best idea is to cache the public list of structures and work off that.
Side question: do structure names have to be unique? Do they have to be unique from station names?