internal static RestChatBadges Create(Model model) { var entity = new RestChatBadges(); entity.Update(model); return(entity); }
internal static async Task <RestChatBadges> GetChatBadgesAsync(BaseRestClient client, ulong channelId) { TokenHelper.TryGetToken(client, channelId, out RestTokenInfo info); var model = await client.RestClient.GetBadgesInternalAsync(info?.Token, channelId); if (model == null) { return(null); } var entity = new RestChatBadges(); entity.Update(model); return(entity); }
// Chat public static async Task <RestChatBadges> GetChatBadgesAsync(BaseTwitchClient client, ulong channelId, RequestOptions options = null) { var model = await client.ApiClient.GetChatBadgesAsync(channelId, options).ConfigureAwait(false); return(RestChatBadges.Create(model)); }