예제 #1
0
 public async Task ShouldCorrectlyRetrievesVideosByMe()
 {
     await AuthenticatedClient.WithTempVideo(async clipId =>
     {
         var videos = await AuthenticatedClient.GetVideosAsync(UserId.Me);
         videos.ShouldNotBeNull();
     });
 }
예제 #2
0
 public async Task ShouldCorrectlyRetrievesVideosByUserId()
 {
     await AuthenticatedClient.WithTempVideo(async clipId =>
     {
         var videos = await AuthenticatedClient.GetVideosAsync(VimeoSettings.UserId);
         videos.ShouldNotBeNull();
         videos.Data.Count.ShouldBeGreaterThan(0);
     });
 }
예제 #3
0
        public async Task ShouldCorrectlyRetrieveSecondPage()
        {
            for (var i = 0; i < 5; i++)
            {
                try
                {
                    var videos = await AuthenticatedClient.GetVideosAsync(VimeoSettings.UserId, 2, 1);

                    videos.ShouldNotBeNull();
                    return;
                }
                catch (VimeoApiException ex)
                {
                    if (ex.Message.Contains("Please try again."))
                    {
                        continue;
                    }

                    throw;
                }
            }
        }