Skip to content

Commit dc6bb94

Browse files
committed
Updated event doc to include streamup and streamdown events
1 parent 3b41f5a commit dc6bb94

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

docs/event.md

+25-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Events
2+
23
- [Events](#events)
34
- [Description](#description)
45
- [Trigger](#trigger)
56
- [Retrigger](#retrigger)
67
- [Verify-Subscription](#verify-subscription)
78

8-
## Description
9+
## Description
910

10-
The `event` product contains commands to trigger mock events for local webhook testing or migration.
11+
The `event` product contains commands to trigger mock events for local webhook testing or migration.
1112

1213
## Trigger
1314

1415
Used to either create or send mock events for use with local webhooks testing.
1516

16-
1717
**Args**
1818

1919
| Argument | Description |
20-
|---------------------|------------------------------------------------------------------------------------------------------------|
20+
| ------------------- | ---------------------------------------------------------------------------------------------------------- |
2121
| `subscribe` | A standard subscription event. Triggers a basic tier 1 sub. |
2222
| `unsubscribe` | A standard unsubscribe event. Triggers a basic tier 1 sub. |
2323
| `gift` | A gifted subscription event. Triggers a basic tier 1 sub. |
@@ -34,7 +34,7 @@ Used to either create or send mock events for use with local webhooks testing.
3434
**Flags**
3535

3636
| Flag | Shorthand | Description | Example | Required? (Y/N) |
37-
|---------------------|-----------|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|-----------------|
37+
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | --------------- |
3838
| `--forward-address` | `-F` | Web server address for where to send mock events. | `-F https://localhost:8080` | N |
3939
| `--transport` | `-T` | The method used to send events. Default is eventsub, but can send using websub. | `-T websub` | N |
4040
| `--to-user` | `-t` | Denotes the receiver's TUID of the event, usually the broadcaster. | `-t 44635596` | N |
@@ -44,7 +44,7 @@ Used to either create or send mock events for use with local webhooks testing.
4444
| `--count` | `-c` | Count of events to fire. This can be used to simulate an influx of subscriptions. | `-c 100` | N |
4545
| `--anonymous` | `-a` | If the event is anonymous. Only applies to `gift` and `cheer` events. | `-a` | N |
4646
| `--status` | `-S` | Status of the event object, currently applies to channel points redemptions. | `-S fulfilled` | N |
47-
| `--item-id` | `-i` | Manually set the ID of the event payload item (for example the reward ID in redemption events). | `-i 032e4a6c-4aef-11eb-a9f5-1f703d1f0b92` | N |
47+
| `--item-id` | `-i` | Manually set the ID of the event payload item (for example the reward ID in redemption events). | `-i 032e4a6c-4aef-11eb-a9f5-1f703d1f0b92` | N |
4848
| `--cost` | `-C` | Amount of bits or channel points redeemed/used in the event. | `-C 250` | N |
4949

5050
**Examples**
@@ -56,9 +56,9 @@ twitch event trigger cheer -f 1234 -t 4567 // generates JSON for a cheer event f
5656

5757
## Retrigger
5858

59-
Allows previous events to be refired based on the event ID. The ID is noted within the event itself, such as in the "subscription" payload of standard webhooks.
59+
Allows previous events to be refired based on the event ID. The ID is noted within the event itself, such as in the "subscription" payload of standard webhooks.
6060

61-
For example, for:
61+
For example, for:
6262

6363
```json
6464
{
@@ -69,19 +69,19 @@ For example, for:
6969
}
7070
}
7171
```
72-
The resulting ID would be `713f3254-0178-9757-7439-d779400c0999`.
72+
73+
The resulting ID would be `713f3254-0178-9757-7439-d779400c0999`.
7374

7475
**Args**
7576
None
7677

7778
**Flags**
7879

79-
| Flag | Shorthand | Description | Example | Required? (Y/N) |
80-
|---------------------|-----------|----------------------------------------------------------------------------------------------------------------------------|-----------------------------|-----------------|
81-
| `--forward-address` | `-F` | Web server address for where to send mock events. | `-F https://localhost:8080` | N |
82-
| `--id` | `-i` | The ID of the event to refire. | `-i <id>` | Y |
83-
| `--secret` | `-s` | Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC. | `-s testsecret` | N |
84-
80+
| Flag | Shorthand | Description | Example | Required? (Y/N) |
81+
| ------------------- | --------- | ---------------------------------------------------------------------------- | --------------------------- | --------------- |
82+
| `--forward-address` | `-F` | Web server address for where to send mock events. | `-F https://localhost:8080` | N |
83+
| `--id` | `-i` | The ID of the event to refire. | `-i <id>` | Y |
84+
| `--secret` | `-s` | Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC. | `-s testsecret` | N |
8585

8686
**Examples**
8787

@@ -91,12 +91,12 @@ twitch event retrigger -i "713f3254-0178-9757-7439-d779400c0999" -F https://loca
9191

9292
## Verify-Subscription
9393

94-
Allows you to test if your webserver responds to subscription requests properly.
94+
Allows you to test if your webserver responds to subscription requests properly.
9595

9696
**Args**
9797

9898
| Argument | Description |
99-
|---------------------|------------------------------------------------------------------------------------------------------------|
99+
| ------------------- | ---------------------------------------------------------------------------------------------------------- |
100100
| `subscribe` | A standard subscription event. Triggers a basic tier 1 sub. |
101101
| `unsubscribe` | A standard unsubscribe event. Triggers a basic tier 1 sub. |
102102
| `gift` | A gifted subscription event. Triggers a basic tier 1 sub. |
@@ -109,17 +109,19 @@ Allows you to test if your webserver responds to subscription requests properly.
109109
| `update-redemption` | Channel Points EventSub event for a redemption being updated. |
110110
| `raid` | Channel Raid event with a random viewer count. |
111111
| `revoke` | User authorization revoke event. Uses local Client as set in `twitch configure` or generates one randomly. |
112+
| `streamup` | Only usable with the `eventsub` transport, a stream online event. |
113+
| `streamdown` | Only usable with the `eventsub` transport, a stream offline event. |
112114

113115
**Flags**
114116

115-
| Flag | Shorthand | Description | Example | Required? (Y/N) |
116-
|---------------------|-----------|----------------------------------------------------------------------------------------------------------------------------|-----------------------------|-----------------|
117-
| `--forward-address` | `-F` | Web server address for where to send mock subscription. | `-F https://localhost:8080` | Y |
118-
| `--secret` | `-s` | Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC. | `-s testsecret` | N |
119-
| `--transport` | `-T` | The method used to send events. Default is eventsub, but can send using websub. | `-T websub` | N |
117+
| Flag | Shorthand | Description | Example | Required? (Y/N) |
118+
| ------------------- | --------- | ------------------------------------------------------------------------------- | --------------------------- | --------------- |
119+
| `--forward-address` | `-F` | Web server address for where to send mock subscription. | `-F https://localhost:8080` | Y |
120+
| `--secret` | `-s` | Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC. | `-s testsecret` | N |
121+
| `--transport` | `-T` | The method used to send events. Default is eventsub, but can send using websub. | `-T websub` | N |
120122

121123
**Examples**
122124

123125
```sh
124126
twitch event verify-subscription cheer -F https://localhost:8080/ // triggers a fake "cheer" EventSub subscription and validates if localhost responds properly
125-
```
127+
```

0 commit comments

Comments
 (0)