You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
triggerCmd.Flags().StringVarP(&transport, "transport", "T", "webhook", fmt.Sprintf("Preferred transport method for event. Defaults to /EventSub.\nSupported values: %s", events.ValidTransports()))
139
149
triggerCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.")
150
+
triggerCmd.Flags().BoolVarP(&noConfig, "no-config", "D", false, "Disables the use of the configuration, if it exists.")
retriggerCmd.Flags().StringVarP(&eventID, "id", "i", "", "ID of the event to be refired.")
169
180
retriggerCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.")
181
+
retriggerCmd.Flags().BoolVarP(&noConfig, "no-config", "D", false, "Disables the use of the configuration, if it exists.")
170
182
retriggerCmd.MarkFlagRequired("id")
171
183
172
184
// verify-subscription flags
@@ -176,7 +188,7 @@ func init() {
176
188
verifyCmd.Flags().StringVar(×tamp, "timestamp", "", "Sets the timestamp to be used in payloads and headers. Must be in RFC3339Nano format.")
177
189
verifyCmd.Flags().StringVarP(&eventID, "subscription-id", "u", "", "Manually set the subscription/event ID of the event itself.") // TODO: This description will need to change with https://github.com/twitchdev/twitch-cli/issues/184
178
190
verifyCmd.Flags().StringVarP(&version, "version", "v", "", "Chooses the EventSub version used for a specific event. Not required for most events.")
179
-
verifyCmd.MarkFlagRequired("forward-address")
191
+
verifyCmd.Flags().BoolVarP(&noConfig, "no-config", "D", false, "Disables the use of the configuration, if it exists.")
180
192
181
193
// websocket flags
182
194
/// flags for start-server
@@ -192,6 +204,10 @@ func init() {
192
204
websocketCmd.Flags().StringVar(&wsSubscription, "subscription", "", `Subscription to target with your server command. Used with "websocket subscription".`)
193
205
websocketCmd.Flags().StringVar(&wsStatus, "status", "", `Changes the status of an existing subscription. Used with "websocket subscription".`)
194
206
websocketCmd.Flags().StringVar(&wsReason, "reason", "", `Sets the close reason when sending a Close message to the client. Used with "websocket close".`)
configureEventCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.")
Copy file name to clipboardExpand all lines: docs/event.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,31 @@
2
2
3
3
-[Events](#events)
4
4
-[Description](#description)
5
+
-[Configure](#configure)
5
6
-[Trigger](#trigger)
6
7
-[Retrigger](#retrigger)
7
8
-[Verify-Subscription](#verify-subscription)
8
-
-[Websocket](#websocket)
9
+
-[WebSocket](#websocket)
9
10
10
11
## Description
11
12
12
-
The `event`product contains commands to trigger mock events for local webhook testing or migration.
13
+
The `event`command contains subcommands to trigger mock events for local webhook testing or migration.
13
14
14
15
All commands exit the program with a non-zero exit code when the command fails, including when an event does not exist, or when the mock EventSub WebSocket server does not start correctly.
15
16
17
+
18
+
## Configure
19
+
20
+
Used to configure the forwarding address and/or the secret used with the `trigger`, `verify-subscription`, and `retrigger` subcommands.
21
+
22
+
**Flags**
23
+
24
+
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|`--forward-address`|`-F`| Web server address for where to send mock events. |`-F https://localhost:8080`| N |
27
+
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length. |`-s testsecret`| N |
28
+
29
+
16
30
## Trigger
17
31
18
32
Used to either create or send mock events for use with local webhooks testing.
@@ -92,6 +106,7 @@ This command can take either the Event or Alias listed as an argument. It is pre
92
106
|`--gift-user`|`-g`| Used only for subcription-based events, denotes the gifting user ID. |`-g 44635596`| N |
93
107
|`--item-id`|`-i`| Manually set the ID of the event payload item (for example the reward ID in redemption events or game in stream events). |`-i 032e4a6c-4aef-11eb-a9f5-1f703d1f0b92`| N |
94
108
|`--item-name`|`-n`| Manually set the name of the event payload item (for example the reward ID in redemption events or game name in stream events). |`-n "Science & Technology"`| N |
109
+
|`--no-config`|`-D`| Disables the use of the configuration values should they exist. |`-D`| N |
95
110
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length. |`-s testsecret`| N |
96
111
|`--session`|| WebSocket session to target. Only used when forwarding to WebSocket servers with --transport=websocket |`--session e411cc1e_a2613d4e`| N |
97
112
|`--subscription-id`|`-u`| Manually set the subscription/event ID of the event itself. |`-u 5d3aed06-d019-11ed-afa1-0242ac120002`| N |
|`--forward-address`|`-F`| Web server address for where to send mock events. |`-F https://localhost:8080`| N |
136
151
|`--id`|`-i`| The ID of the event to refire. |`-i <id>`| Y |
152
+
|`--no-config`|`-D`| Disables the use of the configuration values should they exist. |`-D`| N |
137
153
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length. |`-s testsecret`| N |
Allows you to test if your webserver responds to subscription requests properly.
164
+
Allows you to test if your webserver responds to subscription requests properly. The `forward-address` flag is required *unless* you have configured a default forwarding address via `twitch event configure -F <address>`.
148
165
149
166
**Args**
150
167
@@ -155,6 +172,7 @@ This command takes the same arguments as [Trigger](#trigger).
155
172
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|`--forward-address`|`-F`| Web server address for where to send mock subscription. |`-F https://localhost:8080`| Y |
175
+
|`--no-config`|`-D`| Disables the use of the configuration values should they exist. |`-D`| N |
158
176
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length. |`-s testsecret`| N |
159
177
|`--transport`|`-T`| The method used to send events. Default is `eventsub`. |`-T eventsub`| N |
0 commit comments