Example #1
0
        internal static PubsubSimpleUser Create(TwitchPubsubClient client, SubModel model)
        {
            var entity = new PubsubSimpleUser(client, model.UserId);

            entity.Update(model);
            return(entity);
        }
Example #2
0
        internal static PubsubSimpleUser Create(BasePubsubClient client, SelfModel model)
        {
            var entity = new PubsubSimpleUser(client, model.Id);

            entity.Update(model);
            return(entity);
        }
Example #3
0
        internal virtual void Update(Model model)
        {
            Channel = new PubsubSimpleChannel(Client, model.ChannelId);
            Channel.Update(model);
            User = new PubsubSimpleUser(Client, model.UserId);
            User.Update(model);

            BitsUsed      = model.BitsUsed;
            TotalBitsUsed = model.TotalBitsUsed;
            Context       = model.Context;
            Type          = model.MessageType;
            Version       = model.Version;
        }
Example #4
0
        internal virtual void Update(Model model)
        {
            Channel = PubsubSimpleChannel.Create(Client, model);
            User    = PubsubSimpleUser.Create(Client, model);

            Timestamp = model.Timestamp;
            Plan      = model.SubPlan;
            PlanText  = model.SubPlanName;
            Months    = model.Months;
            IsResub   = model.Context == "resub";

            Message = model.Message.Content;
            Emotes  = model.Message.Emotes.Select(x => PubsubEmote.Create(Client, x)).ToArray();
        }