Skip to content
michaelkringelhede edited this page Oct 22, 2022 · 11 revisions

Location search

You can search for locations by Jid without being logged in:

GET /api/locations/:jid

Response for /api/locations/5gb75n will be similar to:

{
    "location": {
        "id": "79b42f6d-bfa2-49e9-ab07-542359864877",
        "year": 2022,
        "jid": "5gb75n",
        "country": "gb",
        "name": "Magrathea 2022",
        "owner": "bc99c4a3-c186-4104-928d-5843c16ec69b",
        "created": "2022-10-22 18:47:22"
    },
    "errorCode": null,
    "error": null
}

Fetch stats

Fetching stats from the jid-server only required the location id:

GET /api/locations/:location/stats

The response for /api/locations/79b42f6d-bfa2-49e9-ab07-542359864877/stats will be similar to:

{
    "users": [
        {
            "position": 1,
            "userid": "cf4ac6ff-c49e-4a12-84b0-0a255fde6e90",
            "name": "Anker Monrad",
            "jids": 5,
            "countries": 3,
            "latest": "2019-10-18T16:35:26+02:00",
            "change": {
                "jids": 3,
                "countries": 1,
                "position": 1
            }
        },
        {
            "position": 2,
            "userid": "50a59d04-c3ce-47ef-8246-3db11f93f05d",
            "name": "Hilmar Kampmann",
            "jids": 3,
            "countries": 2,
            "latest": "2019-10-18T16:37:20+02:00",
            "change": {
                "jids": 1,
                "countries": 1,
                "position": -1
            }
        },
        {
            "position": 3,
            "userid": "4a66ba4a-f03f-4cf9-8bff-724551139e01",
            "name": "Ove Sehested",
            "jids": 2,
            "countries": 1,
            "latest": "2019-10-18T15:15:15+02:00",
            "change": {
                "jids": 0,
                "countries": 0,
                "position": 0
            }
        }
    ],
    "countries": [
        {
            "position": 1,
            "country": "dk",
            "countryName": "Denmark",
            "jids": 4,
            "created": "2019-10-18T16:26:30+02:00",
            "change": {
                "jids": 0,
                "position": 0
            }
        },
        {
            "position": 2,
            "country": "se",
            "countryName": "Sweden",
            "jids": 3,
            "created": "2019-10-18T16:11:21+02:00",
            "change": {
                "jids": 2,
                "position": 1
            }
        },
        {
            "position": 2,
            "country": "no",
            "countryName": "Norway",
            "jids": 1,
            "created": "2019-10-18T16:26:50+02:00",
            "change": {
                "jids": 0,
                "position": -1
            }
        }
    ],
    "totals": {
        "jids": 10,
        "unique": 7,
        "countries": 3,
        "change": {
            "jids": 4,
            "unique": 1,
            "countries": 0
        }
    },
    "error": null,
    "errorCode": null
}
Clone this wiki locally