예제 #1
0
        public static TwitchActionModel CreateAdAction(int adLength)
        {
            TwitchActionModel action = new TwitchActionModel(TwitchActionType.RunAd);

            action.AdLength = adLength;
            return(action);
        }
예제 #2
0
        public static TwitchActionModel CreateUserAction(TwitchActionType type, string username)
        {
            TwitchActionModel action = new TwitchActionModel(type);

            action.Username = username;
            return(action);
        }
예제 #3
0
        public static TwitchActionModel CreateStreamMarkerAction(string description, bool showInfoInChat)
        {
            TwitchActionModel actionModel = new TwitchActionModel(TwitchActionType.StreamMarker);

            actionModel.StreamMarkerDescription = description;
            actionModel.ShowInfoInChat          = showInfoInChat;
            return(actionModel);
        }
예제 #4
0
        public static TwitchActionModel CreateClipAction(bool includeDelay, bool showInfoInChat)
        {
            TwitchActionModel action = new TwitchActionModel(TwitchActionType.Clip);

            action.ClipIncludeDelay = includeDelay;
            action.ShowInfoInChat   = showInfoInChat;
            return(action);
        }
예제 #5
0
        public static TwitchActionModel CreatePredictionAction(string title, int duration, IEnumerable <string> outcomes, IEnumerable <ActionModelBase> actions)
        {
            TwitchActionModel action = new TwitchActionModel(TwitchActionType.CreatePrediction);

            action.PredictionTitle           = title;
            action.PredictionDurationSeconds = duration;
            action.PredictionOutcomes        = new List <string>(outcomes);
            action.Actions = new List <ActionModelBase>(actions);
            return(action);
        }
예제 #6
0
        public static TwitchActionModel CreatePollAction(string title, int duration, int channelPointCost, int bitCost, IEnumerable <string> choices, IEnumerable <ActionModelBase> actions)
        {
            TwitchActionModel action = new TwitchActionModel(TwitchActionType.CreatePoll);

            action.PollTitle             = title;
            action.PollDurationSeconds   = duration;
            action.PollChannelPointsCost = channelPointCost;
            action.PollBitsCost          = bitCost;
            action.PollChoices           = new List <string>(choices);
            action.Actions = new List <ActionModelBase>(actions);
            return(action);
        }
예제 #7
0
        public static TwitchActionModel CreateUpdateChannelPointReward(Guid id, bool state, string cost, bool updateCooldownsAndLimits, string maxPerStream, string maxPerUser, string globalCooldown)
        {
            TwitchActionModel action = new TwitchActionModel(TwitchActionType.UpdateChannelPointReward);

            action.ChannelPointRewardID         = id;
            action.ChannelPointRewardState      = state;
            action.ChannelPointRewardCostString = cost;
            action.ChannelPointRewardUpdateCooldownsAndLimits = updateCooldownsAndLimits;
            action.ChannelPointRewardMaxPerStreamString       = maxPerStream;
            action.ChannelPointRewardMaxPerUserString         = maxPerUser;
            action.ChannelPointRewardGlobalCooldownString     = globalCooldown;
            return(action);
        }