public static async Task <long?> GetViewerCount()
        {
            var twixel = new Twixel("iy9ihx1dt50wo7jsb5p8tv5kvpd1yvq", "http://localhost");
            var stream = await twixel.RetrieveStream("brentschooley");

            return(stream.viewers);
        }
Beispiel #2
0
 public UserTests()
 {
     twixel = new Twixel(clientId,
         clientSecret,
         /*Whatever your redirect URL is*/ "");
     twixel.TwixelErrorEvent += twixel_TwixelErrorEvent;
 }
Beispiel #3
0
        public async void ClientIdTest()
        {
            // This test doesn't pass https://discuss.dev.twitch.tv/t/problem-with-client-id/6528/2
            // You know...cause Twitch sucks
            string responseString = await Twixel.GetWebData(new Uri(new TrexUri(TwitchConstants.baseUrl)), Twixel.APIVersion.v3);

            JObject responseObject = JObject.Parse(responseString);
            bool    identified     = (bool)responseObject["identified"];

            Assert.True(identified);
        }
Beispiel #4
0
 public SettingsForm()
 {
     InitializeComponent();
     accessToken = Properties.Settings.Default.Key;
     ircMessages = Properties.Settings.Default.messageCapacity;
     this.messagesNumeric.Value = (decimal)ircMessages;
     this.CallbackInput.Text    = accessToken;
     this.millisNumeric.Value   = (decimal)Properties.Settings.Default.Interval;
     this.millisChat.Value      = (decimal)Properties.Settings.Default.ChatInterval;
     twitchClient = new Twixel(clientID,
                               "http://localhost", Twixel.APIVersion.v3);
 }
Beispiel #5
0
 public Twixelv5Tests()
 {
     twixel = new Twixel(Secrets.ClientId,
                         "http://golf1052.com", Twixel.APIVersion.v5);
 }
 public Twixelv2UserTests()
 {
     twixel = new Twixel(Secrets.ClientId,
         Secrets.RedirectUrl, Twixel.APIVersion.v2);
 }
 public Twixelv5UserTests()
 {
     twixel = new Twixel(Secrets.ClientId,
                         Secrets.RedirectUrl, Twixel.APIVersion.v5);
 }
Beispiel #8
0
 public Twixelv3Tests()
 {
     twixel = new Twixel(Secrets.ClientId,
         "http://golf1052.com", Twixel.APIVersion.v3);
 }
Beispiel #9
0
 public TwixelTests()
 {
     twixel = new Twixel(ApiKey.clientId, ApiKey.clientSecret, "http://golf1052.com");
     twixel.TwixelErrorEvent += twixel_TwixelErrorEvent;
 }