Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/server-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@
title: Server API
---

TODO: describe API usage
### Authentication

The authentication is implemented via cookies. In order to obtain a valid cookie, one must simply copy the `auth_token` one from the browser's console and use to for desired API calls.

![cookie](/img/content/server-api/cookie.png)

For example, in order to update a given player's skill, one can execute the following command:

```bash
$ curl -b "auth_token=<redacted>" -X PUT -H "Content-Type: application/json" -d '{"scout":4,"soldier":6,"demoman":3,"medic":2}' https://api.tf2pickup.eu/players/76561199195756652/skill
{"scout":4,"soldier":6,"demoman":3,"medic":2}
```
Binary file added static/img/content/server-api/cookie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.