diff --git a/docs/websockets/examples/index.md b/docs/websockets/examples/index.md index a43e86a..49a1fbb 100644 --- a/docs/websockets/examples/index.md +++ b/docs/websockets/examples/index.md @@ -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 diff --git a/docs/websockets/topics/channel-giveaway.md b/docs/websockets/topics/channel-giveaway.md new file mode 100644 index 0000000..8afbc06 --- /dev/null +++ b/docs/websockets/topics/channel-giveaway.md @@ -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 + } + } + } +} +``` diff --git a/docs/websockets/topics/index.md b/docs/websockets/topics/index.md new file mode 100644 index 0000000..f3779d1 --- /dev/null +++ b/docs/websockets/topics/index.md @@ -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