EDSM-NET / FrontEnd

Issues tracker for EDSM
https://www.edsm.net/
37 stars 1 forks source link

API: add updated at field to systems endpoint. #338

Closed lostb1t closed 4 years ago

lostb1t commented 4 years ago

Would be helpful to have a updated at field available in the systems listing api.

{
        "name": "Phua Chrea ZV-E d11-6780",
        "id": 48254844,
        "id64": 232969285408483,
        "updated_at": "2019-06-12 16:15:58+00",
        "coords": {
            "x": -1081.34375,
            "y": 53.6875,
            "z": 34511.0625
        },
        "coordsLocked": false,
        "information": {}
    },
    {
        "name": "Eorl Aewsy RA-D b26-0",
        "id": 48254845,
        "id64": 587739566305,
        "updated_at": "2019-10-12 16:15:58+00",
        "coords": {
            "x": -6200.9375,
            "y": 17.84375,
            "z": -13299.5
        },
        "coordsLocked": false,
        "information": {}
    }
klightspeed commented 4 years ago

Add submitted=1 to the query string to get a date field. https://www.edsm.net/api-v1/system?systemName=Phua%20Chrea%20ZV-E%20d11-6780&submitted=1&showid=1&coords=1&showInformation=1

{
    "name": "Phua Chrea ZV-E d11-6780",
    "id": 48254844,
    "id64": 232969285408483,
    "coords": {
        "x": -1081.34375,
        "y": 53.6875,
        "z": 34511.0625
    },
    "coordsLocked": false,
    "information": {},
    "date": "2020-01-31 09:44:50",
    "submitted": []
}

https://www.edsm.net/api-v1/systems?systemName=Phua%20Chrea%20ZV-E%20d11-6780&submitted=1&showid=1&coords=1&showInformation=1

[
    {
        "name": "Phua Chrea ZV-E d11-6780",
        "id": 48254844,
        "id64": 232969285408483,
        "coords": {
            "x": -1081.34375,
            "y": 53.6875,
            "z": 34511.0625
        },
        "coordsLocked": false,
        "information": {},
        "date": "2020-01-31 09:44:50",
        "submitted": []
    }
]
lostb1t commented 4 years ago

@klightspeed Ah nice. Tnx!