SpaceTradersAPI / issues-and-suggestions

16 stars 1 forks source link

Add endpoint for viewing all active flight plans. #30

Closed HamishWHC closed 3 years ago

HamishWHC commented 3 years ago

GET api.spacetraders.io/users/{{username}}/flight-plans is probably the best option. Should return:

{
    "flightPlans": [
        {
            "id": "cklvk22kb530709l98984jon9u6",
            "ship": "cklukug3c278802c889hwnf5z5i",
            "fuelConsumed": 14,
            "fuelRemaining": 0,
            "timeRemainingInSeconds": 59,
            "arrivesAt": "2021-03-05T00:25:11.384Z",
            "terminatedAt": null,
            "destination": "OE-D2",
            "departure": "OE-ZEP4",
            "distance": 24
        }
    ]
}
HamishWHC commented 3 years ago

Would also be useful if it returned flight plan history as well, but could be filtered to only return active ones. I would quite like the ability to look at past movements.