ts-twitch-api 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/package.json +1 -1
- package/twitch-api.ts +524 -765
package/README.md
CHANGED
|
@@ -10,10 +10,6 @@ Very simple `TwitchApi` class and TypeScript interfaces for all Twitch API endpo
|
|
|
10
10
|
* _Response Body_
|
|
11
11
|
* Includes descriptions for the fields
|
|
12
12
|
|
|
13
|
-
## TODO
|
|
14
|
-
|
|
15
|
-
* Pass RequestInit object
|
|
16
|
-
|
|
17
13
|
## Installation
|
|
18
14
|
|
|
19
15
|
```bash
|
|
@@ -88,4 +84,15 @@ const streams = await twitchApi.streams.getStreams(
|
|
|
88
84
|
if (streams.ok) {
|
|
89
85
|
console.log(streams.data);
|
|
90
86
|
}
|
|
87
|
+
|
|
88
|
+
// pass fetch options via RequestInit object
|
|
89
|
+
const ac = new AbortController();
|
|
90
|
+
const users = twitchApi.users.getUsers(
|
|
91
|
+
{ id: ['1', '2'] },
|
|
92
|
+
null,
|
|
93
|
+
null,
|
|
94
|
+
{ signal: ac.signal },
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
ac.abort();
|
|
91
98
|
```
|