コード例 #1
0
        public async Task <V3AlliancePublicInfo> PublicInfoAsync(int allianceId)
        {
            string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.AllianceV3PublicInfo(allianceId), _testing);

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

            EsiV3AlliancePublicInfo esiPublicInfo = JsonConvert.DeserializeObject <EsiV3AlliancePublicInfo>(esiRaw.Model);

            return(_mapper.Map <EsiV3AlliancePublicInfo, V3AlliancePublicInfo>(esiPublicInfo));
        }