Beispiel #1
0
        private async void button21_Click(object sender, EventArgs e)
        {
            TwitchLib.TwitchAPIClasses.Stream stream = await TwitchApi.GetTwitchStream(textBox25.Text);

            MessageBox.Show(string.Format("average fps: {0}\nchannel name: {1}\ncreated at: {2}\ndelay: {3}\ngame: {4}\nid: {5}\nplaylist: {6}\npreview large: {7}\nvideo height: {8}\n viewers: {9}",
                                          stream.AverageFps, stream.Channel.Name, stream.CreatedAt, stream.Delay, stream.Game, stream.Id, stream.IsPlaylist, stream.Preview.Large, stream.VideoHeight, stream.Viewers));
        }
Beispiel #2
0
        private async void DashboardRefreshTimer_Tick(object sender, EventArgs e)
        {
            //MessageBox.Show(
            //delay, uptime, averagefps, broadcaster language filter, broadcaste check box

            StreamGame.Text  = (await TwitchApi.GetTwitchChannel(channel)).Game;
            StreamTitle.Text = (await TwitchApi.GetTwitchChannel(channel)).Status;
            string langCode = (await TwitchApi.GetTwitchChannel(channel)).BroadcasterLanguage;

            StreamLanguage.SelectedValue = langCode;
            if (await TwitchApi.BroadcasterOnline(channel) != false)
            {
                StreamViewers.Text = (await TwitchApi.GetTwitchStream(channel)).Viewers.ToString();
            }
            else
            {
                StreamViewers.Text = "Stream Offline";
            }
            StreamFollowers.Text = (await TwitchApi.GetTwitchChannel(channel)).Followers.ToString();
        }