internal new static RestUserFollow Create(BaseRestClient client, Model model) { var entity = new RestUserFollow(client); entity.Update(model); return(entity); }
internal static async Task <IReadOnlyCollection <RestUserFollow> > GetFollowersAsync(BaseRestClient client, ulong channelId, bool ascending, uint limit, uint offset) { TokenHelper.TryGetToken(client, channelId, out RestTokenInfo info); var model = await client.RestClient.GetChannelFollowersInternalAsync(info?.Token, channelId, ascending, limit, offset); var entity = model.Follows.Select(x => { var follow = new RestUserFollow(client); follow.Update(x); return(follow); }); return(entity.ToArray()); }
// Users public static async Task <IReadOnlyCollection <RestUserFollow> > GetFollowersAsync(BaseTwitchClient client, ulong channelId, bool ascending, PageOptions paging = null, RequestOptions options = null) { var model = await client.ApiClient.GetChannelFollowersAsync(channelId, ascending, paging, options).ConfigureAwait(false); return(model.Follows.Select(x => RestUserFollow.Create(client, x)).ToArray()); }