Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tripplyons/viewers
Lists who is currently watching a given stream on Twitch
https://github.com/tripplyons/viewers
Last synced: 8 days ago
JSON representation
Lists who is currently watching a given stream on Twitch
- Host: GitHub
- URL: https://github.com/tripplyons/viewers
- Owner: tripplyons
- License: mit
- Created: 2020-05-28T19:03:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T19:47:05.000Z (over 4 years ago)
- Last Synced: 2024-09-15T23:17:54.911Z (2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/viewers
- Size: 3.91 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# viewers
Lists who is currently watching a given stream on Twitch## Installation
```
npm i -s viewers
```## Usage
Here is an example from `test.js`:
```javascript
const viewers = require('viewers')async function logViewers(channelName) {
console.log(await viewers(channelName))
}// A popular 24/7 stream
logViewers('twitchplayspokemon')
```It should output something similar to the following:
```javascript
[
{ type: 'vip', name: 'tppsimulator' },
{ type: 'mod', name: 'honshoureimu' },
{ type: 'mod', name: 'red031000' },
{ type: 'mod', name: 'rjri' },
{ type: 'mod', name: 'sinr2014' },
{ type: 'mod', name: 'tpp' },
{ type: 'viewer', name: '1in256miss' },
{ type: 'viewer', name: '20superkoopatroopa02' },
{ type: 'viewer', name: '4td0' },
...
]
```Here are all of the possible types of viewers:
- `broadcaster`: The same person that is streaming
- `vip`: A status given by the streamer to special viewers
- `mod`: A status given by the streamer to moderators
- `staff`: Someone who works at Twitch
- `admin`: Someone who works at Twitch
- `global_mod`: Someone who works at Twitch
- `viewer`: An average user