Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexandrecoulay/simple-twitch-api
Simple way to interact with the Twitch helix API
https://github.com/alexandrecoulay/simple-twitch-api
helix helix-api nodejs nodejs-api npm npm-module npm-package npmjs simple twitch twitch-api twitch-api-helix
Last synced: 4 months ago
JSON representation
Simple way to interact with the Twitch helix API
- Host: GitHub
- URL: https://github.com/alexandrecoulay/simple-twitch-api
- Owner: alexandrecoulay
- License: mit
- Created: 2020-10-20T14:41:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-19T10:24:00.000Z (almost 3 years ago)
- Last Synced: 2024-04-24T02:46:07.070Z (9 months ago)
- Topics: helix, helix-api, nodejs, nodejs-api, npm, npm-module, npm-package, npmjs, simple, twitch, twitch-api, twitch-api-helix
- Language: TypeScript
- Homepage:
- Size: 195 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A simpler way to interact with the Twitch API (helix version : https://dev.twitch.tv/docs/api/reference) write in Typescript### Roadmap :
- [x] TypeScript Support
- [x] Basic Get and Events
- [ ] All Get requests
- [x] All EventSub
- [ ] All Posts Request
- [ ] All Put Request### Support :
```
- ES5
- ES6
- typescript (you don't need to install another package to work with TS).
```
## Install
```
$ npm install simple-twitch-api
```
```
$ yarn add simple-twitch-api
```## Example
```js
import Twitch from 'simple-twitch-api';
import { CLIENT_ID, CLIENT_SECRET } from "./config.json";const SCOPES = "user:read:email";
async function script() {
const request = await twitch.getToken(CLIENT_ID, CLIENT_SECRET, SCOPES);const token = request.access_token;
const client = new twitch.default({
twitch_client_id: CLIENT_ID,
token: token
});const get_streams = await client.stream.fetch({
user_login: [
"alex_off"
]
})console.table(get_streams.data);
}script()
```
## Maintainers
- [Coulay Alexandre](https://github.com/alexandrecoulay)
## License
[MIT License](LICENSE).