SpaceTradersAPI / issues-and-suggestions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flight-plans response properties

staff0rd opened this issue · comments

It would be nice if flight-plans responses used the same property for shipId, to, from. POST uses ship, departure, destination.

Response from GET game/systems/OE/flight-plans

{
  "flightPlans": [
    {
      "id": "ckmhpcsn9128580915s615jzndap",
      "shipId": "ckmhp3jcc119145915s6dms0ncii",
      "createdAt": "2021-03-20T12:23:25.701Z",
      "arrivesAt": "2021-03-20T13:02:25.685Z",
      "from": "OE-UC-AD",
      "to": "OE-PM-TR",
      "username": "CartonMan",
      "shipType": "GR-MK-II"
    }
  ]
}

Response from POST users/<username>/flight-plans

{
  "flightPlan": {
    "id": "ckmhqmhn95088515s6q7m3w6wq",
    "ship": "ckmhq5r7u157150915s6ltlj4x6i",
    "fuelConsumed": 2,
    "fuelRemaining": 8,
    "timeRemainingInSeconds": 89,
    "arrivesAt": "2021-03-20T13:00:27.598Z",
    "terminatedAt": null,
    "destination": "OE-PM",
    "departure": "OE-PM-TR",
    "distance": 4
  }
}

This was fixed a few days ago!