Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/twitch

src/get-stream.ts

14 lines · 484 B · TypeScript
import { getStreamStatus } from './client.ts'

/**
 * Check whether one or more Twitch channels are currently live.
 * Omitting selectors checks the authenticated user's stream.
 *
 * @example
 * import getStream from 'kody:@kody/twitch/get-stream'
 * const [status] = await getStream({ login: 'twitchdev' })
 * // => { userLogin: 'twitchdev', isLive: false }
 */
export default async function twitchGetStream(params: Record<string, unknown> = {}) {
	return getStreamStatus(params)
}