Esempio n. 1
0
        internal static RestChatBadges Create(Model model)
        {
            var entity = new RestChatBadges();

            entity.Update(model);
            return(entity);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        // 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));
        }