Updated docs
This commit is contained in:
+12
-2
@@ -71,10 +71,20 @@ Ein Beitrag (`Entry`):
|
|||||||
"last_bump": 1700000400, "username": "max", "avatar": "static/media/…" }
|
"last_bump": 1700000400, "username": "max", "avatar": "static/media/…" }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In Hauptfeed und `replies` des Threads trägt jeder Beitrag mit Antworten
|
||||||
|
zusätzlich `latest`: den jüngsten nicht gelöschten Beitrag aus seinem ganzen
|
||||||
|
Teilbaum (nach `created_at`, höchstens 50 Ebenen tief). `skipped` zählt die
|
||||||
|
Beiträge auf dem Pfad dazwischen, gelöschte eingeschlossen (0 = direkte
|
||||||
|
Antwort). Ohne passenden Nachfahren fehlt das Feld.
|
||||||
|
|
||||||
|
```json
|
||||||
|
"latest": { "entry": Entry, "skipped": 2 }
|
||||||
|
```
|
||||||
|
|
||||||
| Methode | Pfad | Auth | Request | Erfolg |
|
| Methode | Pfad | Auth | Request | Erfolg |
|
||||||
|---------|------|------|---------|--------|
|
|---------|------|------|---------|--------|
|
||||||
| GET | `/api/entry/feed/{page}` | – | – | `200 [Entry]`: Threads nach letzter Aktivität, 20 pro Seite, Seite 0–100, `[]` am Ende |
|
| GET | `/api/entry/feed/{page}` | – | – | `200 [Entry]` mit `latest`: Threads nach letzter Aktivität, 20 pro Seite, Seite 0–100, `[]` am Ende |
|
||||||
| GET | `/api/entry/{pid}/thread` | – | – | `200 {"entry", "ancestors": [Entry], "replies": [Entry]}` |
|
| GET | `/api/entry/{pid}/thread` | – | – | `200 {"entry", "ancestors": [Entry], "replies": [Entry]}`; `ancestors` Root zuerst, `replies` (max. 100) nach letzter Aktivität, mit `latest` |
|
||||||
| GET | `/api/entry/{pid}/votes` | – | – | `200 {"pid","left","right","selected"}` (`selected`: `left`/`right`/`none`) |
|
| GET | `/api/entry/{pid}/votes` | – | – | `200 {"pid","left","right","selected"}` (`selected`: `left`/`right`/`none`) |
|
||||||
| POST | `/api/entry/create` | ✓ | multipart: `content` (max. 1000), `file` (optional), `reply_to` (optional) | `201 {"pid","content","filepath","reply_to"}` |
|
| POST | `/api/entry/create` | ✓ | multipart: `content` (max. 1000), `file` (optional), `reply_to` (optional) | `201 {"pid","content","filepath","reply_to"}` |
|
||||||
| POST | `/api/entry/{pid}/edit` | ✓ Autor | `content` | `200 {"pid","content"}` |
|
| POST | `/api/entry/{pid}/edit` | ✓ Autor | `content` | `200 {"pid","content"}` |
|
||||||
|
|||||||
Reference in New Issue
Block a user