Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs/websockets/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class Program
## Related Commands

- See the [Websockets](../index.md) documentation for more information on the Astro Websocket Gateway
- Check the available [Topics](../topics/index.md) for subscription
- Check the available [Topics](./topics) for subscription

## FAQ

Expand Down
50 changes: 50 additions & 0 deletions docs/websockets/topics/channel-giveaway.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: channel-giveaway
sidebar_label: "Channel Giveaway"
description: "Real-time updates for channel giveaways via WebSocket"
tags:
- websocket
- channel
- giveaway
keywords:
- StreamElements
- WebSocket
- channel update
- giveaway
- real-time data
---

# Channel Giveaway

## Overview

The `channel.giveaway` topic provides real-time updates for an active giveaway. This includes activities such as when a giveaway starts or ends as well as users purchasing tickets, winning the giveaway, and more.

#### Payload

```json
{
"id": "01J6VTDB25SX14GDBDFZWDX3M9",
"ts": "2024-09-03T11:30:39Z",
"type": "message",
"topic": "channel.giveaway",
"room": "5ad23dcc18fff500d78c5348",
"data": {
"channelId": "5ad23dcc18fff500d78c5348",
"giveawayId": "67cf4296216c6ff883878c0a",
"action": "enter",
"state": "running",
"data": {
"totalTickets": 100,
"totalUsers": 10,
"entry": {
"providerId": "14027",
"username": "jtv",
"subscriber": true,
"tickets": 15,
"new": false
}
}
}
}
```
17 changes: 17 additions & 0 deletions docs/websockets/topics/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: topics
sidebar_label: "Topics"
description: "A list of all available topics for the Astro Websocket Gateway"
tags:
- api
- websockets
- real-time
keywords:
- astro websocket
- streamelements api
- real-time notifications
- websocket connection
- pubsub
---

# Topics