From ca58e885f7288144b0dd37fe5360a61a6c7e5b48 Mon Sep 17 00:00:00 2001 From: Adeithe <28549467+Adeithe@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:34:00 -0400 Subject: [PATCH 1/2] Add docs for channel giveaway event --- docs/websockets/topics/channel-giveaway.md | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/websockets/topics/channel-giveaway.md 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 + } + } + } +} +``` From ca5798ce9feb3d93143e9dcaa1af0c0d5b5168a9 Mon Sep 17 00:00:00 2001 From: Adeithe <28549467+Adeithe@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:14:02 -0400 Subject: [PATCH 2/2] Fix broken link --- docs/websockets/examples/index.md | 2 +- docs/websockets/topics/index.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 docs/websockets/topics/index.md 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/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