예제 #1
0
		public async void CanGetFollowersForUser()
		{
			var config = new Config();

			var client = new TwitchRestClient(config);
			var followers = await client.GetFollowers("ballouthebear");

			Assert.True(followers.Any(), "There are no followers!");
		}
예제 #2
0
		private async static void OnFollowerUpdate(object state)
		{
			var config = state as IConfig;
			foreach (var keyVal in FollowSubscriptions)
			{
				var client = new TwitchRestClient(config);
				var follows = await client.GetFollowers(keyVal.Key);
				foreach (var actions in FollowSubscriptions[keyVal.Key])
				{
					if (follows != null) actions.Value(follows);
				}
			}
		}