void TwitchSubscriberOnly(bool enabled = true);
void TwitchEmoteOnly(bool enabled = true);
void TwitchSlowMode(bool enabled = true, int duration = 0);
void TwitchFollowMode(bool enabled = true, int duration = 0);
// Added in v0.1.18
bool TwitchIsUserSubscribed(string userId, out string tier);
List<Cheermote> GetCheermotes();
bool SendWhisper(string userName, string message, bool bot = true);
bool TwitchAddModerator(string userName);
bool TwitchRemoveModerator(string userName);
bool TwitchAddVip(string userName);
bool TwitchRemoveVip(string userName);
void SendMessage(string message, bool bot = true);
void SendAction(string action, bool bot = true);
bool TwitchClearChatMessages(bool bot = true);
bool TwitchDeleteChatMessage(string messageId, bool bot = true);
bool TwitchClearChannelTags();
bool TwitchSetChannelTags(List<string> tags);
bool TwitchAddChannelTag(string tag);
bool TwitchRemoveChannelTag(string tag);
Clearing tags is currently broken on Twitch's side, as long as you keep at least 1 tag, everything will work. Unknown when Twitch will fix this
bool TwitchSendShoutoutById(string userId);
bool TwitchSendShoutoutByLogin(string userLogin);
bool TwitchBanUser(string userName, string reason = null, bool bot = false);
// This will unban and untimeout users
bool TwitchUnbanUser(string userName, bool bot = false);
// A duration of 0 will result in a ban
bool TwitchTimeoutUser(string username, int duration, string reason = null, bool bot = false);
// Added in v0.1.18
List<TwitchReward> TwitchGetRewards();
Structure of TwitchReward:
public class TwitchReward
{
public string Id { get; set; }
public string Title { get; set; }
public string Prompt { get; set; }
public int Cost { get; set; }
public bool InputRequired { get; set; }
public string BackgroundColor { get; set; }
public bool Paused { get; set; }
public bool Enabled { get; set; }
public bool IsOurs { get; set; }
}
long TwitchGetChannelPointsUsedByUserId(string userId);
void DisableReward(string rewardId);
void EnableReward(string rewardId);
void PauseReward(string rewardId);
void UnPauseReward(string rewardId);
void TwitchRewardGroupEnable(string groupName);
void TwitchRewardGroupDisable(string groupName);
void TwitchRewardGroupToggleEnable(string groupName);
void TwitchRewardGroupPause(string groupName);
void TwitchRewardGroupUnPause(string groupName);
void TwitchRewardGroupTogglePause(string groupName);
bool UpdateRewardTitle(string rewardId, string title);
bool UpdateRewardPrompt(string rewardId, string prompt);
void UpdateRewardCost(string rewardId, int cost, bool additive = false);
void UpdateRewardCooldown(string rewardId, int cooldown, bool additive = false);
bool UpdateReward(string rewardId, string title = null, string prompt = null, int? cost = null);
bool TwitchRedemptionFulfill(string rewardId, string redemptionId);
bool TwitchRedemptionCancel(string rewardId, string redemptionId);
void TwitchResetRewardCounter(string rewardId);
void TwitchResetRewardUserCounters(string rewardId);
void TwitchResetUserRewardCounters(string userId, bool persisted);
void TwitchResetUserRewardCounter(string rewardId, string userId);
bool TwitchPollCreate(string title, List<string> choices, int duration, int channelPointsPerVote = 0);
void TwitchPollTerminate(string pollId);
void TwitchPollArchive(string pollId);
string TwitchPredictionCreate(string title, List<string> options, int duration);
void TwitchPredictionCancel(string predictionId);
void TwitchPredictionLock(string predictionId);
void TwitchPredictionResolve(string predictionId, string winningId);
// Added in v0.1.18
long TwitchGetBitsDonatedByUserId(string userId);
All clip data is sorted by view count, this is a limitation of the Twitch API. To get most recent clips, one would have to get all the clips for the user, one got-ya for this, there is a hard limit of 1000 clips that can be returned
List<ClipData> GetAllClips();
List<ClipData> GetClipsForUser(string username);
List<ClipData> GetClipsForUser(string userName, int count);
List<ClipData> GetClipsForUser(string username, DateTime start, DateTime end);
List<ClipData> GetClipsForUser(string username, DateTime start, DateTime end, int count);
List<ClipData> GetClipsForUser(string username, TimeSpan duration);
List<ClipData> GetClipsForUser(string username, TimeSpan duration, int count);
List<ClipData> GetClipsForUser(int userId);
List<ClipData> GetClipsForUser(int userId, int count);
List<ClipData> GetClipsForUser(int userId, DateTime start, DateTime end);
List<ClipData> GetClipsForUser(int userId, DateTime start, DateTime end, int count);
List<ClipData> GetClipsForUser(int userId, TimeSpan duration);
List<ClipData> GetClipsForUser(int userId, TimeSpan duration, int count);
List<ClipData> GetClipsForGame(int gameId);
List<ClipData> GetClipsForGame(int gameId, int count);
List<ClipData> GetClipsForGame(int gameId, DateTime start, DateTime end);
List<ClipData> GetClipsForGame(int gameId, DateTime start, DateTime end, int count);
List<ClipData> GetClipsForGame(int gameId, TimeSpan duration);
List<ClipData> GetClipsForGame(int gameId, TimeSpan duration, int count);
ClipData CreateClip();
ClipData contains the following values:
string Id;
string Url;
string EmbedUrl;
int BroadcasterId;
string BroadcasterName;
int CreatorId;
string CreatorName;
string VideoId;
string GameId;
string Language;
string Title;
int ViewCount;
DateTime CreatedAt;
string ThumbnailUrl;
float Duration;
StreamMarker CreateStreamMarker(string description);
public class StreamMarker
{
public int Id { get; set; }
public DateTime CreatedAt { get; set; }
public string Description { get; set; }
public int Position { get; set; }
}
void TwitchRunCommercial(int duration);
bool SetChannelTitle(string title);
GameInfo SetChannelGame(string game);
bool SetChannelGameById(string gameId);
bool TwitchStartRaidById(string userId);
bool TwitchStartRaidByName(string userName);
bool TwitchCancelRaid();
Supported color values are
blue
,orange
,green
,purple
void TwitchAnnounce(string message, bool bot = false, string color = null);
List<TeamInfo> GetTeamInfoById(string userId);
List<TeamInfo> GetTeamInfoByLogin(string userLogin);
public class TeamInfo
{
public string Id { get; set; }
public string Login { get; set; }
public string Name { get; set; }
public string BackgroundImageUrl { get; set; }
public string Banner { get; set; }
public string CreatedAt { get; set; }
public string UpdatedAt { get; set; }
public string Info { get; set; }
public string ThumbnailUrl { get; set; }
public string TeamName { get; set; }
public string TeamDisplayName { get; set; }
public string TeamId { get; set; }
}
string TwitchOAuthToken;
string TwitchClientId;