public VideoSearchDetailsResponse VideoDetailsSearch(string id, VideoDetailsModulesOptions modulesRequested) { return(PolicyService.ExecuteRetryAndCapture400Errors( "VideoSearchService.VideoDetailsSearch", ApiKeys.BingSearchRetryInSeconds, () => { var result = VideoSearchRepository.VideoDetailsSearch(id, modulesRequested); return result; }, null)); }
public VideoSearchDetailsResponse VideoDetailsSearch(string id, VideoDetailsModulesOptions modulesRequested) { try { var result = VideoSearchRepository.VideoDetailsSearch(id, modulesRequested); return(result); } catch (Exception ex) { Logger.Error("VideoSearchService.VideoDetailsSearch failed", this, ex); } return(null); }
public virtual async Task <VideoSearchDetailsResponse> VideoDetailsSearchAsync(string id, VideoDetailsModulesOptions modulesRequested) { var response = await RepositoryClient.SendGetAsync(ApiKeys.BingSearch, $"{ApiKeys.BingSearchEndpoint}{detailsUrl}?id={id}&modulesRequested={Enum.GetName(typeof(VideoDetailsModulesOptions), modulesRequested)}"); return(JsonConvert.DeserializeObject <VideoSearchDetailsResponse>(response)); }
public async Task <VideoSearchDetailsResponse> VideoDetailsSearchAsync(string id, VideoDetailsModulesOptions modulesRequested) { var response = await SendGetAsync($"{detailsUrl}?id={id}&modulesRequested={Enum.GetName(typeof(VideoDetailsModulesOptions), modulesRequested)}"); return(JsonConvert.DeserializeObject <VideoSearchDetailsResponse>(response)); }
public VideoSearchDetailsResponse VideoDetailsSearch(string id, VideoDetailsModulesOptions modulesRequested) { return(Task.Run(async() => await VideoDetailsSearchAsync(id, modulesRequested)).Result); }