Skip to main content
Corvus Connection

ITwitchApi

Interface
TheOmenDen.StreamPulse.Scripting.ITwitchApiRead-only Twitch query operations available inside a script handler, bound to the broadcaster channel captured when the invocation began. Every method is failure-safe: a Twitch API error or network fault is logged (with confidential data stripped) and surfaced as a benign default (null / false) — it never throws, so a graph can branch on the result without a try/catch and a failing call can never crash the host.

Members

9
  • CancelRaidAsync
    method
    Task CancelRaidAsync(CancellationToken cancellationToken = default)
    Cancels the broadcaster's pending outgoing raid. No-ops (logs) on any API error.
  • GetFollowerAsync
    method
    Task<TwitchFollowerInfo> GetFollowerAsync(string userId, CancellationToken cancellationToken = default)
    The follow record for userId, or null when they don't follow (or on error).
  • GetLiveTeamMembersAsync
    method
    Task<TwitchTeamMembersResult> GetLiveTeamMembersAsync(string teamId, CancellationToken cancellationToken = default)
    A team's currently-live members only; an empty result on a blank team id or error.
  • GetStreamAsync
    method
    Task<TwitchStreamInfo> GetStreamAsync(CancellationToken cancellationToken = default)
    The current stream for the broadcaster, or null when offline (or on error).
  • GetTeamMembersAsync
    method
    Task<TwitchTeamMembersResult> GetTeamMembersAsync(string teamId, CancellationToken cancellationToken = default)
    A team's full member roster; an empty result on a blank team id or error.
  • GetTeamsAsync
    method
    Task<TwitchTeamsResult> GetTeamsAsync(CancellationToken cancellationToken = default)
    The broadcaster's teams; an empty result on error (never null, never throws).
  • IsFollowingAsync
    method
    Task<bool> IsFollowingAsync(string userId, CancellationToken cancellationToken = default)
    True when userId follows the broadcaster; false if not or on error.
  • IsLiveAsync
    method
    Task<bool> IsLiveAsync(CancellationToken cancellationToken = default)
    True when the broadcaster is currently live; false if offline or on error.
  • StartRaidAsync
    method
    Task StartRaidAsync(string toBroadcasterId, CancellationToken cancellationToken = default)
    Starts an outgoing raid to toBroadcasterId (a team member's channel id). No-ops (logs) on a blank target or any API error. Needs channel:manage:raids.