Skip to content

Commit

Permalink
docs: Fix code snippet for getSubscriptionsByStatus (#86)
Browse files Browse the repository at this point in the history
* docs: Fix code snippet for getSubscriptionsByStatus

* docs: Update snippet in lib/tes.js
  • Loading branch information
LinneB authored Dec 29, 2023
1 parent a1c8f46 commit 7118de0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/tesjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ Get a list of your event subscriptions by status

**Example**
```js
const subs = await tes.getSubscriptionsByType("channel.update");
console.log(`I have ${subs.total} "channel.update" event subscriptions`);
const subs = await tes.getSubscriptionsByStatus("enabled");
console.log(`I have ${subs.total} "enabled" event subscriptions`);
```

* * *
Expand Down
4 changes: 2 additions & 2 deletions lib/tes.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ class TES {
* @returns {Promise} Subscription data. See [Twitch doc](https://dev.twitch.tv/docs/api/reference/#get-eventsub-subscriptions) for details
* @example
* ```js
* const subs = await tes.getSubscriptionsByType("channel.update");
* console.log(`I have ${subs.total} "channel.update" event subscriptions`);
* const subs = await tes.getSubscriptionsByStatus("enabled");
* console.log(`I have ${subs.total} "enabled" event subscriptions`);
* ```
*/
getSubscriptionsByStatus(status, cursor) {
Expand Down

0 comments on commit 7118de0

Please sign in to comment.