-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement star system data retrieval from Spansh? #2327
Comments
Buy/sell locations are available with a query like:
|
Type-ahead endpoint: https://spansh.co.uk/api/systems/field_values/system_names?q=sol |
Searches (e.g. for station services) require a POST to https://www.spansh.co.uk/api/stations/search with a json payload defining desired filters. Payload example (for a manufactured materials trader near coordinates 6.25, -1.25, -5.75): {
"filters": {
"services": {
"value": ["Material Trader"]
},
"primary_economy": {
"value": ["Industrial"]
}
},
"sort": [{
"distance": {
"direction": "asc"
}
}
],
"size": 10,
"page": 0,
"reference_coords": {
"x": 6.25,
"y": -1.28,
"z": -5.75
}
} The server appears to respond ASAP with the result rather than returning a referral number that needs to be checked periodically. {
"count": 811,
"from": 0,
"results": [
{
"controlling_minor_faction": "Sirius Corporation",
"distance": 0.00124999999999997,
"distance_to_arrival": 1024.068257,
"economies": [
{
"name": "Extraction",
"share": 30.0
},
{
"name": "Industrial",
"share": 70.0
}
],
"government": "Corporate",
"has_large_pad": true,
"has_market": true,
"has_outfitting": true,
"has_shipyard": true,
"id": "ECmg_I8BSefGriDOBLba",
"is_planetary": false,
"large_pads": 9,
"market": [ ... ],
"market_id": 128136952,
"market_updated_at": "2024-06-08 20:34:03+00",
"material_trader": "Manufactured",
"medium_pads": 18,
"modules": [ ... ],
"name": "Patterson Enterprise",
"outfitting_updated_at": "2024-06-08 20:34:03+00",
"power_state": "Contested",
"primary_economy": "Industrial",
"prohibited_commodities": [ ... ],
"secondary_economy": "Extraction",
"services": [ ... ],
"ships": [ ... ],
"shipyard_updated_at": "2024-06-08 20:34:03+00",
"small_pads": 17,
"system_id64": 121569805492,
"system_name": "Sirius",
"system_power": [
"Edmund Mahon",
"Zachary Hudson"
],
"system_x": 6.25,
"system_y": -1.28125,
"system_z": -5.75,
"type": "Coriolis Starport",
"updated_at": "2024-06-08 21:15:56+00"
},
...,
],
"search": {
"filters": {
"primary_economy": {
"value": [
"Industrial"
]
},
"services": {
"value": [
"Material Trader"
]
}
},
"page": 0,
"reference_coords": {
"x": 6.25,
"y": -1.28,
"z": -5.75
},
"size": 10,
"sort": [
{
"distance": {
"direction": "asc"
}
}
]
},
"search_reference": "25F7C398-26EC-11EF-B109-EEC2E5B66F40",
"size": 10
} |
Faction names: |
What happens now
Star system data is sourced from EDSM. EDSM data is bound to user accounts and may not be retained for accounts deactivated due to inactivity. Further, the EDSM API is rate limited and rate limiting has a dramatic impact on service query search times.
What I'd like to happen
Consider transitioning from EDSM to a more comprehensive / more complete data source.
How it can happen
It is possible to access system data via the Spansh API using id64 / system address, e.g. https://www.spansh.co.uk/api/system/263303726260. The complementary user-friendly version of the page is at https://www.spansh.co.uk/system/263303726260.
Similarly, station data is available using market ID: https://www.spansh.co.uk/api/station/3707582976 and body data is available via body id64: https://www.spansh.co.uk/api/body/36029060322690228.
Body id64 is calculated from:
(bodyId << 55) + systemAddress
.EDDI Version
4.0.1
The text was updated successfully, but these errors were encountered: