IRewardsApi
Interface
Members
6
EnsureAsync
method
Creates a reward named title only if the app does not already own one by that name; otherwise returns the existing one. Idempotent, so it is safe on a recurring trigger.ValueTask<RewardResult> EnsureAsync(string title, int cost, string prompt = default, int? maxPerStream = default, int? maxPerUserPerStream = default, int? globalCooldownSeconds = default, CancellationToken cancellationToken = default)FulfillAsync
method
Approves a pending redemption. The viewer keeps the points they spent.ValueTask<RewardResult> FulfillAsync(string rewardId, string redemptionId, CancellationToken cancellationToken = default)RefundAsync
method
Rejects a pending redemption; Twitch returns the viewer's points. Fails for a reward the app does not own, and for one that skips the request queue - those auto-fulfil and can never be refunded.ValueTask<RewardResult> RefundAsync(string rewardId, string redemptionId, CancellationToken cancellationToken = default)SetEnabledAsync
method
Shows or hides the reward in the viewer's channel-point menu.ValueTask<RewardResult> SetEnabledAsync(string rewardId, bool isEnabled, CancellationToken cancellationToken = default)SetPausedAsync
method
Pauses or resumes redemptions. A paused reward stays visible but cannot be redeemed - the usual way to close a queue mid-stream without the reward vanishing from the menu.ValueTask<RewardResult> SetPausedAsync(string rewardId, bool isPaused, CancellationToken cancellationToken = default)UpdateAsync
method
Edits a reward the app owns. Every optional argument left unset is untouched on Twitch, so this can change one field without restating the rest.ValueTask<RewardResult> UpdateAsync(string rewardId, string title = default, int? cost = default, string prompt = default, string backgroundColor = default, CancellationToken cancellationToken = default)
