Skip to content
← Public packages

@kody/twitch

Look up Twitch users, channels, streams, and follows, with dry-run chat and channel updates.

FollowFork

Files

request.ts

15 lines · 577 B · TypeScript
import { requestHelix } from './client.ts'

/**
 * Perform an authenticated Twitch Helix request.
 * Helix requires both Authorization (from the twitch integration) and Client-Id.
 * Non-GET calls need confirm: true. Pass dryRun: true to preview.
 *
 * @example
 * import request from 'kody:@kody/twitch/request'
 * const response = await request({ path: '/users', throwOnError: true })
 * // => { ok: true, status: 200, data: { data: [{ login: '...' }] } }
 */
export default async function twitchRequest(params: Record<string, unknown> = {}) {
	return requestHelix(params)
}