Example #1
0
 /// <summary>
 /// Returns the latest contributions from the API.
 /// </summary>
 /// <returns></returns>
 async Task <ContributionList> GetRemoteContributionsAsync(int offset = 0, int limit = 0)
 {
     try
     {
         return(await api.GetContributions(offset, limit));
     }
     catch (ApiException e)
     {
         HandleApiException(e);
         return(null);
     }
     catch (Exception e)
     {
         analyticsService.Report(e);
         return(null);
     }
 }
Example #2
0
 /// <summary>
 /// Gets the MVPs activities, depending on the offset (page) and the limit (number of items per-page)
 /// </summary>
 /// <param name="offset">page to return</param>
 /// <param name="limit">number of items for the page</param>
 /// <param name="forceRefresh">The result is cached in a backing list by default which prevents unnecessary fetches. If you want the cache refreshed, set this to true</param>
 /// <returns>A list of the MVP's contributions</returns>
 public async Task <ContributionList> GetContributionsAsync(int offset = 0, int limit = 0, bool forceRefresh = false)
 {
     try
     {
         return(await api.GetContributions(offset, limit));
     }
     catch (ApiException e)
     {
         HandleApiException(e);
         return(null);
     }
     catch (Exception e)
     {
         analyticsService.Report(e);
         return(null);
     }
 }