internal new static RestChannelFollow Create(BaseTwitchClient client, Model model)
        {
            var entity = new RestChannelFollow(client);

            entity.Update(model);
            return(entity);
        }
Beispiel #2
0
        internal static async Task <IReadOnlyCollection <RestChannelFollow> > GetFollowsAsync(BaseRestClient client, ulong userId, SortMode sort, bool ascending, uint limit, uint offset)
        {
            var token = TokenHelper.GetSingleToken(client);
            var model = await client.RestClient.GetFollowsInternalAsync(token, userId, sort, ascending, limit, offset);

            var entity = model.Follows.Select(x =>
            {
                var follow = new RestChannelFollow(client);
                follow.Update(x);
                return(follow);
            });

            return(entity.ToArray());
        }
Beispiel #3
0
        internal static async Task <RestChannelFollow> GetFollowAsync(BaseRestClient client, ulong userId, ulong channelId)
        {
            var token = TokenHelper.GetSingleToken(client);
            var model = await client.RestClient.GetFollowInternalAsync(token, userId, channelId);

            if (model == null)
            {
                return(null);
            }

            var entity = new RestChannelFollow(client);

            entity.Update(model);
            return(entity);
        }