public async Task StartUpdateProcessAsync(CancellationToken cancellationToken)
        {
            var httpResponseMessage =
                await _httpClient.PostAsync(_urlFormatService.FormatUrlComponent(_integrationClientConfig.StartUpdateProcessUrl), null, cancellationToken);

            httpResponseMessage.UnwindHttpExceptions();
        }
Exemplo n.º 2
0
        public async Task <IDictionary <int, int> > GetUpdatesAsync(CancellationToken cancellationToken)
        {
            var httpResponseMessage = await _httpClient.GetAsync(_urlFormatService.FormatUrlComponent(_tvMazeConfig.UpdatesUrl), cancellationToken);

            var apiResponse = await httpResponseMessage.UnwindHttpExceptions().ReadContentAsStringAsync();

            return(_jsonConverter.DeserializeObject <IDictionary <int, int> >(apiResponse));
        }