Esempio n. 1
0
 public async Task <FacebookEventDTO> GetEvents()
 {
     Debug.WriteLine("FacebookGraphApiService - GetEvents()");
     try
     {
         var eventsUri = new Uri($"{ApiConfig.FbApiPath}{ApiConfig.FbApiEventsParams}{ApiConfig.FbAccessToken}");
         using (new DisposableStopwatch(duration => _eventTracker.Api(ApiType.FacebookEvents, (long)duration.TotalMilliseconds)))
         {
             return(await _apiService.GetAndRetryWithTimeout <FacebookEventDTO>(eventsUri, ApiConfig.FbApiCallTimeout, ApiConfig.FbApiCallMaxRetries));
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine("FacebookGraphApiService - GetEvents() - Exception");
         throw ex;
     }
 }