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

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

            EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 3600));

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

            return(_mapper.Map <IList <EsiV1ContractsCharacterItems>, IList <V1ContractsCharacterItems> >(esiModel));
        }