Example #1
0
 public async Task GetAnime(ConcurrentBag <SpecialUserAnimeRate> outContainer, AnimeStatus status = AnimeStatus.None)
 {
     try
     {
         await UserAnimeRequest.GetSpecialAnime(this.CurrentUser, this.AuthToken, outContainer, status).ConfigureAwait(false);
     }
     catch (TokenExpiredException e)
     {
         RefreshTokenEvent?.Invoke(this.AuthToken);
         ErrorTextEvent?.Invoke(e.Message);
         return;
     }
     catch (Exception e)
     {
         ErrorTextEvent?.Invoke(e.Message);
         return;
     }
 }
Example #2
0
 public async Task GetAnime(List <UserAnimeRate> testlist, int limitItemsByReq = 50)
 {
     try
     {
         await UserAnimeRequest.GetUserAnime(this.CurrentUser, this.AuthToken, limitItemsByReq, testlist).ConfigureAwait(false);
     }
     catch (TokenExpiredException e)
     {
         RefreshTokenEvent?.Invoke(this.AuthToken);
         ErrorTextEvent?.Invoke("Token expired,refreshing, try again");
         return;
     }
     catch (Exception e)
     {
         ErrorTextEvent?.Invoke(e.Message);
         return;
     }
 }