Twitch Viewers
@reset/twitch-viewersv2026.10.23.1
01README
Record and summarise a game's live Twitch streams and viewers.
02Behaviors
@reset/twitch-viewersv2026.10.23.1twitch_viewers.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| clientId | string | Twitch application client id, supplied with a vault.get expression, never a literal. Sent only to id.twitch.tv and api.twitch.tv |
| clientSecret | string | Twitch application client secret, supplied with a vault.get expression, never a literal. Sent only to id.twitch.tv to get an app access token |
| gameId? | string | Twitch game or category id, e.g. 33214; give this or gameName, not both |
| gameName? | string | Twitch game or category name, matched exactly as Twitch spells it, e.g. Fortnite; give this or gameId, not both |
fn sample(maxPages?: number, top?: number)
Read the game's live streams from Twitch's Helix API and record their count, viewers, top streams and languages as a new version
| Argument | Type | Description |
|---|---|---|
| maxPages? | number | Most pages of 100 streams to read, most watched first, 1 to 50; 10 when omitted |
| top? | number | How many of the most watched streams to record, 1 to 100; 10 when omitted |
fn summarise(since?: string, top?: number)
Summarise the recorded samples: peak and average viewers and live streams, and the streams most often in the top lists
| Argument | Type | Description |
|---|---|---|
| since? | string | Only summarise samples recorded at or after this ISO-8601 time; all samples when omitted |
| top? | number | How many of the most often listed streams to report, 1 to 100; 10 when omitted |
Resources
streams(infinite)— One game's live Twitch streams at one moment: how many, their viewers, the top streams and the viewers per language
summary(infinite)— Peak and average viewers and live streams over the recorded samples, and the streams listed most often in the top lists
03Stats
B
86 / 100
Downloads
4
Archive size
22.2 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository0/2missing
behavior-spelling1 accepted
- (extension) — Written against swamp 20261020.024627.0, the release that added the behavior spelling. Consumers on an older swamp are not supported.
05Platforms
06Labels