0.1.2 • Published 9 months ago
@twapi/api v0.1.2
@twapi/api
The Twitch API provides the tools and data used to develop Twitch integrations.
Documentation
Read our documentation for the package usage
Quickstart
1. Add the following dependencies
pnpm add @twapi/auth @twapi/api
2. Create a new Api Client
const credentials = new Credentials(oauthToken, clientId, clientSecret);
const authProvider = new AuthProvider(credentials);
const apiClient = new ApiClient(authProvider);
3. Access different resources
const status = await client.moderation.checkAutomodStatus({
msg_id: "a unique id",
msg_text: "Check this message please",
});
const chatters = await client.chat.getChatters("broadcaster_id");
for await (const chatter of chatters) {
console.log(chatter.user_id);
}