コード例 #1
0
        public async Task <IList <V1ContractsCharacterBids> > CharacterBidsAsync(SsoToken token, int contractId)
        {
            StaticMethods.CheckToken(token, ContractScopes.esi_contracts_read_character_contracts_v1);

            string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.ContractsV1CharacterBids(token.CharacterId, contractId), _testing);

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

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

            return(_mapper.Map <IList <EsiV1ContractsCharacterBids>, IList <V1ContractsCharacterBids> >(esiModel));
        }