示例#1
0
        public async Task <V1DogmaDynamicItem> DynamicItemAsync(int typeId, long itemId)
        {
            string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.DogmaV1DynamicItem(typeId, itemId), _testing);

            EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, SecondsToDT()));

            EsiV1DogmaDynamicItem esiModel = JsonConvert.DeserializeObject <EsiV1DogmaDynamicItem>(esiRaw.Model);

            return(_mapper.Map <EsiV1DogmaDynamicItem, V1DogmaDynamicItem>(esiModel));
        }