Ejemplo n.º 1
0
        private async void button40_Click(object sender, EventArgs e)
        {
            //textbox36
            List <TwitchLib.TwitchAPIClasses.BadgeResponse.Badge> badges = (await TwitchApi.GetChannelBadges(textBox36.Text)).ChannelBadges;

            foreach (TwitchLib.TwitchAPIClasses.BadgeResponse.Badge badge in badges)
            {
                MessageBox.Show($"Available images for: {badge.BadgeName}\nAlpha: {badge.Alpha}\nImage: {badge.Image}\nSVG: {badge.SVG}");
            }
        }
Ejemplo n.º 2
0
        private static async Task ShowBadges(string channelName)
        {
            TwitchApi.SetClientId(clientId);

            Console.WriteLine("ShowBadges: Hole Informationen über die Badges vom Channel: " + channelName);

            // Asynchron die Anfrage absetzten und auf Antwort warten.
            BadgeResponse response = await TwitchApi.GetChannelBadges(channelName);

            var badges = response.ChannelBadges;

            Console.WriteLine("\nShowBadges: Channel {0} hat: {1} Badges", channelName, badges.Count);
            foreach (var badge in badges)
            {
                Console.WriteLine("BadgeName: " + badge.BadgeName);
            }
        }