Skip to content
Merged
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
8 changes: 8 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Returns dismissed clips with thumbnail, platform, uploader info, and dismissal t
| Method | Path | Description |
|--------|------|-------------|
| POST | `/api/clips/[id]/watched` | Mark clip as watched |
| PATCH | `/api/clips/[id]/watched` | Update watch percent only |
| DELETE | `/api/clips/[id]/watched` | Mark clip as unwatched |
| POST | `/api/clips/[id]/favorite` | Toggle favorite |
| GET | `/api/clips/[id]/views` | List who has viewed |
Expand All @@ -163,6 +164,13 @@ Request: { "watchPercent": 85 } (optional, 0–100)
Response: { "watched": true }
```

### PATCH /api/clips/[id]/watched
Updates watch percent without marking the clip as watched. Only updates existing watched records — does not create new ones. Used for periodic progress tracking while the user is still viewing.
```
Request: { "watchPercent": 85 } (0–100)
Response: { "updated": true }
```

### POST /api/clips/[id]/favorite
Toggles favorite on/off. Also syncs with reactions: favoriting creates a ❤️ reaction (with notification), unfavoriting removes the paired ❤️ reaction and its notification.
```
Expand Down
Loading