Skip to content

Trojsten API

Michal Hozza edited this page Nov 3, 2019 · 2 revisions

Account API

Current account info

Url: https://login.trojsten.sk/api/me

Method: GET

Request format:

None

Response format:

{
    "id": user_id,
    "username": username,
    "email": user_email
}

Submit API

External submit

Url: https://www.ksp.sk/odovzdavanie/ajax/externy_submit/

Method: POST

Request format:

{
  "token": token,
  "user": user_id,
  "points": points
}

token: string, must be registered in: https://www.ksp.sk/admin/old_submit/externalsubmittoken/add/

user_id: int, the ID of the user in DB

points: float

Response format:

None