示例#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;
                }
            }
        }