![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
ts-twitch-api
Advanced tools
Very simple TwitchApi class and TypeScript interfaces for all Twitch API endpoints
Very simple TwitchApi
class and TypeScript interfaces for all Twitch API endpoints
fetch
under the hoodnpm i ts-twitch-api
pnpm i ts-twitch-api
yarn add ts-twitch-api
import type {
UpdateAutoModSettingsParams,
UpdateAutoModSettingsBody,
UpdateAutoModSettingsResponse,
} from 'ts-twitch-api';
const updateAutoModSettings = async (
params: UpdateAutoModSettingsParams,
body: UpdateAutoModSettingsBody,
) => {
const searchParams = new URLSearchParams(params);
const url = `https://api.twitch.tv/helix/moderation/automod/settings?${searchParams}`;
const response = await fetch(url, {
method: 'PUT',
body: JSON.stringify(body),
headers: {
Authorization: `Bearer ${process.env.ACCESS_TOKEN}`,
'Client-Id': process.env.CLIENT_ID,
'Content-Type': 'application/json',
},
});
return response.json() as Promise<UpdateAutoModSettingsResponse>;
}
TwitchApi
classimport { TwitchApi } from 'ts-twitch-api';
const twitchApi = new TwitchApi({
accessToken: process.env.ACCESS_TOKEN,
clientId: process.env.CLIENT_ID,
});
const response = await twitchApi.chat.updateChatSettings(
// query params
{ broadcaster_id: '1', moderator_id: '2' },
// body
{ emote_mode: true },
);
if (response.ok) {
console.log(response.data);
} else {
console.error(response.status);
}
const streams = await twitchApi.streams.getStreams(
// some endpoints accept multiple ids like this: `id=1234&id=5678`
{ user_id: ['1', '2'] },
// override accessToken and/or clientId for different requests
'<accessToken>',
'<clientId>',
);
if (streams.ok) {
console.log(streams.data);
}
// pass fetch options via RequestInit object
const ac = new AbortController();
const users = twitchApi.users.getUsers(
{ id: ['1', '2'] },
null,
null,
{ signal: ac.signal },
);
ac.abort();
FAQs
Very simple TwitchApi class and TypeScript interfaces for all Twitch API endpoints
The npm package ts-twitch-api receives a total of 18 weekly downloads. As such, ts-twitch-api popularity was classified as not popular.
We found that ts-twitch-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.