[domov](README.md)
# API dokumentacia

## Timer API

### Write Time Endpoint

**Endpoint:** `GET /api/timer/write/<str:timer_id>/<str:chip_id>/<str:time>/`

**Description:** Tento endpoint sluzi na zapis casu do databazy. Zaeoven vytvori
novy zaznam v tabulke `Lap` ak najde registraciu s danou kartou. Ak nieje ziadene ukopncene 
kolo, tak vytovri nove a cas pouzije ako start. Ak najde neukoncene kolo, tak ho ukonci a
zapisuje cas ako end.

**Parameters:**
- `timer_id` (string): identifikator casomiery, ktora odosiela request. (napr. 12345)
- `chip_id` (string): id karty, ktora bola nacitana. (napr. 222-222-222-222)
- `time` (string): cas v timestamp formate spolu s milisekundami. (napr. 1741169316.149847)

**Example Request:**

```bash
curl -X GET "http://your-domain/api/timer/write/12345/222-222-222-222/1741169316.149847/"

