twitch-agent/TwitchEventSub/Types/EventSubSubscription/Condition.cs
Adam R. Grey 3f717df1d4 psuedoinitial
actually I had a previous repo but my dumb ass let the real appsettings sneak in
2021-10-24 01:13:07 -04:00

81 lines
3.2 KiB
C#

using System;
using Newtonsoft.Json;
namespace TwitchEventSub.Types.Conditions
{
#region object oriented
public class Condition
{
public bool Similar(Condition condition)
{
return JsonConvert.SerializeObject(this) == JsonConvert.SerializeObject(condition);
}
}
public abstract class TargetChannel : Condition
{
public string broadcaster_user_id { get; set; }
}
public class TargetExtension : Condition
{
public string extension_client_id { get; set; }
}
public class TargetSelf : Condition
{
public string client_id { get; set; }
}
public class TargetUser : Condition
{
public string user_id { get; set; }
}
public abstract class TargetCustomChannelPointsReward : Condition
{
public string broadcaster_user_id { get; set; }
public string reward_id { get; set; }
}
#endregion
public class ChannelBan : TargetChannel { }
public class ChannelSubscribe : TargetChannel { }
public class ChannelSubscriptionEnd : TargetChannel { }
public class ChannelSubscriptionGift : TargetChannel { }
public class ChannelSubscriptionMessage : TargetChannel { }
public class ChannelCheer : TargetChannel { }
public class ChannelUpdate : TargetChannel { }
public class ChannelFollow : TargetChannel { }
public class ChannelUnban : TargetChannel { }
public class ChannelModeratorAdd : TargetChannel { }
public class ChannelModeratorRemove : TargetChannel { }
public class ChannelPointsCustomRewardAdd : TargetChannel { }
public class ChannelPollBegin : TargetChannel { }
public class ChannelPollProgress : TargetChannel { }
public class ChannelPollEnd : TargetChannel { }
public class ChannelPredictionBegin : TargetChannel { }
public class ChannelPredictionProgress : TargetChannel { }
public class ChannelPredictionLock : TargetChannel { }
public class ChannelPredictionEnd : TargetChannel { }
public class Goals : TargetChannel { }
public class HypeTrainBegin : TargetChannel { }
public class HypeTrainProgress : TargetChannel { }
public class HypeTrainEnd : TargetChannel { }
public class StreamOnline : TargetChannel { }
public class StreamOffline : TargetChannel { }
public class ChannelRaid : Condition
{
public string from_broadcaster_user_id { get; set; }
public string to_broadcaster_user_id { get; set; }
}
public class ChannelPointsCustomRewardUpdate : TargetCustomChannelPointsReward { }
public class ChannelPointsCustomRewardRemove : TargetCustomChannelPointsReward { }
public class ChannelPointsCustomRewardRedemptionAdd : TargetCustomChannelPointsReward { }
public class ChannelPointsCustomRewardRedemptionUpdate : TargetCustomChannelPointsReward { }
public class DropEntitlementGrant : Condition
{
public string organization_id { get; set; }
public string category_id { get; set; }
public string campaign_id { get; set; }
}
public class ExtensionBitsTransactionCreate : TargetExtension { }
public class UserAuthorizationGrant : TargetSelf { }
public class UserAuthorizationRevoke : TargetSelf { }
public class UserUpdate : TargetUser { }
}