docs: update remaining docs with vote tracking API changes
Update README.md, docs/api/README.md, session-lifecycle guide, webhooks-and-events guide, and archive docs (BOT_INTEGRATION, API_QUICK_REFERENCE) with new endpoints and vote.received event. Made-with: Cursor
This commit is contained in:
@@ -85,13 +85,53 @@ ws://localhost:5000/api/sessions/live
|
||||
}
|
||||
}
|
||||
|
||||
// Vote received (live votes only, not chat-import)
|
||||
{
|
||||
"type": "vote.received",
|
||||
"timestamp": "2025-11-01T...",
|
||||
"data": {
|
||||
"sessionId": 123,
|
||||
"game": { "id": 42, "title": "Quiplash 3", "pack_name": "Party Pack 7" },
|
||||
"vote": { "username": "viewer123", "type": "up", "timestamp": "2025-11-01T20:30:00Z" },
|
||||
"totals": { "upvotes": 14, "downvotes": 3, "popularity_score": 11 }
|
||||
}
|
||||
}
|
||||
|
||||
// Pong
|
||||
{ "type": "pong" }
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Live Voting
|
||||
## Votes
|
||||
|
||||
### Get Vote History
|
||||
|
||||
```http
|
||||
GET /api/votes?session_id=5&game_id=42&username=viewer123&vote_type=up&page=1&limit=50
|
||||
```
|
||||
|
||||
**Response (200)**:
|
||||
```json
|
||||
{
|
||||
"votes": [
|
||||
{
|
||||
"id": 891,
|
||||
"session_id": 5,
|
||||
"game_id": 42,
|
||||
"game_title": "Quiplash 3",
|
||||
"pack_name": "Party Pack 7",
|
||||
"username": "viewer123",
|
||||
"vote_type": "up",
|
||||
"timestamp": "2025-11-01T20:30:00.000Z",
|
||||
"created_at": "2025-11-01T20:30:01.000Z"
|
||||
}
|
||||
],
|
||||
"pagination": { "page": 1, "limit": 50, "total": 237, "total_pages": 5 }
|
||||
}
|
||||
```
|
||||
|
||||
All query parameters are optional. No authentication required.
|
||||
|
||||
### Submit Live Vote
|
||||
|
||||
|
||||
Reference in New Issue
Block a user