public PagedModel <V2BookmarksCharacterFolder> CharacterBookmarkFolders(SsoToken token, int page) { StaticMethods.CheckToken(token, BookmarkScopes.esi_bookmarks_read_character_bookmarks_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.BookmarksV2CharactersFolders(token.CharacterId, page), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 3600)); IList <EsiV2BookmarksCharacterFolder> esiModel = JsonConvert.DeserializeObject <IList <EsiV2BookmarksCharacterFolder> >(esiRaw.Model); IList <V2BookmarksCharacterFolder> mapped = _mapper.Map <IList <EsiV2BookmarksCharacterFolder>, IList <V2BookmarksCharacterFolder> >(esiModel); return(new PagedModel <V2BookmarksCharacterFolder> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public IList <V1PlanetaryInteractionCharactersPlanets> CharactersPlanets(SsoToken token) { StaticMethods.CheckToken(token, PlanetScopes.esi_planets_manage_planets_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.PlanetaryInteractionV1CharactersPlanets(token.CharacterId), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 600)); IList <EsiV1PlanetaryInteractionCharactersPlanets> esiPlanets = JsonConvert.DeserializeObject <IList <EsiV1PlanetaryInteractionCharactersPlanets> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1PlanetaryInteractionCharactersPlanets>, IList <V1PlanetaryInteractionCharactersPlanets> >(esiPlanets)); }
public IList <V1IndustryCorporation> Corporation(SsoToken token, int corporationId, bool includeCompleted, int page) { StaticMethods.CheckToken(token, IndustryScopes.esi_industry_read_corporation_jobs_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.IndustryV1CorporationJobs(corporationId, includeCompleted, page), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 300)); IList <EsiV1IndustryCorporation> esiModel = JsonConvert.DeserializeObject <IList <EsiV1IndustryCorporation> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1IndustryCorporation>, IList <V1IndustryCorporation> >(esiModel)); }
public async Task <IList <V1IndustrySystem> > SystemsAsync() { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.IndustryV1Systems(), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, 3600)); IList <EsiV1IndustrySystem> esiModel = JsonConvert.DeserializeObject <IList <EsiV1IndustrySystem> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1IndustrySystem>, IList <V1IndustrySystem> >(esiModel)); }
public IList <V1CalendarSummary> Summaries(SsoToken token, int fromEvent) { StaticMethods.CheckToken(token, CalendarScopes.esi_calendar_read_calendar_events_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.CalendarV1Summaries(token.CharacterId, fromEvent), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 5)); IList <EsiV1CalendarSummary> esiModel = JsonConvert.DeserializeObject <IList <EsiV1CalendarSummary> >(esiRaw.Model); return(_mapper.Map <IList <V1CalendarSummary> >(esiModel)); }
public async Task RespondEventAsync(SsoToken token, int eventId, V3CalendarResponse response) { StaticMethods.CheckToken(token, CalendarScopes.esi_calendar_respond_calendar_events_v1); EsiV3CalendarResponse esiResponse = _mapper.Map <EsiV3CalendarResponse>(response); string jsonResponse = JsonConvert.SerializeObject(esiResponse); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.CalendarV3EventResponse(token.CharacterId, eventId), _testing); await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.PutAsync(StaticMethods.CreateHeaders(token), url, jsonResponse)); }
public async Task <V1MarketGroupInformation> GroupAsync(int marketGroupId) { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1Group(marketGroupId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, SecondsToDt())); EsiV1MarketGroupInformation esiModel = JsonConvert.DeserializeObject <EsiV1MarketGroupInformation>(esiRaw.Model); return(_mapper.Map <V1MarketGroupInformation>(esiModel)); }
public V4SkillsSkills Skills(SsoToken token) { StaticMethods.CheckToken(token, SkillScopes.esi_skills_read_skills_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.SkillsV4Skills(token.CharacterId), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 120)); EsiV4SkillsSkills esiModel = JsonConvert.DeserializeObject <EsiV4SkillsSkills>(esiRaw.Model); return(_mapper.Map <EsiV4SkillsSkills, V4SkillsSkills>(esiModel)); }
public async Task <PagedModel <int> > TypesAsync(int regionId, int page) { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1Types(regionId, page), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, 600)); IList <int> esiModel = JsonConvert.DeserializeObject <IList <int> >(esiRaw.Model); return(new PagedModel <int> { Model = esiModel, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public async Task <IList <int> > GroupsAsync() { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1Groups(), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, SecondsToDt())); return(JsonConvert.DeserializeObject <IList <int> >(esiRaw.Model)); }
public async Task <PagedModel <V1MarketOrders> > OrdersAsync(int regionId, OrderType orderType, int page, int?typeId) { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1Orders(regionId, orderType, page, typeId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, 300)); IList <EsiV1MarketOrders> esiModel = JsonConvert.DeserializeObject <IList <EsiV1MarketOrders> >(esiRaw.Model); IList <V1MarketOrders> mapped = _mapper.Map <IList <EsiV1MarketOrders>, IList <V1MarketOrders> >(esiModel); return(new PagedModel <V1MarketOrders> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public async Task <IList <V1MarketHistory> > HistoryAsync(int regionId, int typeId) { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1History(regionId, typeId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, SecondsToDt())); IList <EsiV1MarketHistory> esiModel = JsonConvert.DeserializeObject <IList <EsiV1MarketHistory> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1MarketHistory>, IList <V1MarketHistory> >(esiModel)); }
public PagedModel <V3MarketCorporationOrdersHistoric> CorporationOrdersHistoric(SsoToken token, int corporationId, int page) { StaticMethods.CheckToken(token, MarketScopes.esi_markets_read_corporation_orders_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV2CorporationOrdersHistoric(corporationId, page), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 3600)); IList <EsiV3MarketCorporationOrdersHistoric> esiModel = JsonConvert.DeserializeObject <IList <EsiV3MarketCorporationOrdersHistoric> >(esiRaw.Model); IList <V3MarketCorporationOrdersHistoric> mapped = _mapper.Map <IList <EsiV3MarketCorporationOrdersHistoric>, IList <V3MarketCorporationOrdersHistoric> >(esiModel); return(new PagedModel <V3MarketCorporationOrdersHistoric> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public async Task <V3PlanetaryInteractionCharactersPlanet> CharacterPlanetAsync(SsoToken token, int planetId) { StaticMethods.CheckToken(token, PlanetScopes.esi_planets_manage_planets_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.PlanetaryInteractionV3CharactersPlanet(token.CharacterId, planetId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 600)); EsiV3PlanetaryInteractionCharactersPlanet esiPlanet = JsonConvert.DeserializeObject <EsiV3PlanetaryInteractionCharactersPlanet>(esiRaw.Model); return(_mapper.Map <V3PlanetaryInteractionCharactersPlanet>(esiPlanet)); }
public PagedModel <V1MarketStructure> Structure(SsoToken token, long structureId, int page) { StaticMethods.CheckToken(token, MarketScopes.esi_markets_structure_markets_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1Structure(structureId, page), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(token), url, 300)); IList <EsiV1MarketStructure> esiModel = JsonConvert.DeserializeObject <IList <EsiV1MarketStructure> >(esiRaw.Model); IList <V1MarketStructure> mapped = _mapper.Map <IList <EsiV1MarketStructure>, IList <V1MarketStructure> >(esiModel); return(new PagedModel <V1MarketStructure> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public async Task <PagedModel <V1PlanetaryInteractionCorporationCustomsOffice> > CorporationsCustomsOfficesAsync(SsoToken token, int corporationId, int page) { StaticMethods.CheckToken(token, PlanetScopes.esi_planets_read_customs_offices_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.PlanetaryInteractionV1CorporationsCustomsOffices(corporationId, page), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 3600)); IList <EsiV1PlanetaryInteractionCorporationCustomsOffice> esiCustomOffices = JsonConvert.DeserializeObject <IList <EsiV1PlanetaryInteractionCorporationCustomsOffice> >(esiRaw.Model); IList <V1PlanetaryInteractionCorporationCustomsOffice> mapped = _mapper.Map <IList <EsiV1PlanetaryInteractionCorporationCustomsOffice>, IList <V1PlanetaryInteractionCorporationCustomsOffice> >(esiCustomOffices); return(new PagedModel <V1PlanetaryInteractionCorporationCustomsOffice> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public async Task <IList <V2MarketCharactersOrders> > CharacterOrdersAsync(SsoToken token) { StaticMethods.CheckToken(token, MarketScopes.esi_markets_read_character_orders_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV2CharacterOrders(token.CharacterId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 1200)); IList <EsiV2MarketCharactersOrders> esiModel = JsonConvert.DeserializeObject <IList <EsiV2MarketCharactersOrders> >(esiRaw.Model); return(_mapper.Map <IList <EsiV2MarketCharactersOrders>, IList <V2MarketCharactersOrders> >(esiModel)); }
public async Task <V1SkillsAttributes> AttributesAsync(SsoToken token) { StaticMethods.CheckToken(token, SkillScopes.esi_skills_read_skills_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.SkillsV1Attributes(token.CharacterId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 120)); EsiV1SkillsAttributes esiModel = JsonConvert.DeserializeObject <EsiV1SkillsAttributes>(esiRaw.Model); return(_mapper.Map <EsiV1SkillsAttributes, V1SkillsAttributes>(esiModel)); }
public async Task <PagedModel <V1MarketCharacterHistoricOrders> > CharacterOrdersHistoricAsync(SsoToken token, int page) { StaticMethods.CheckToken(token, MarketScopes.esi_markets_read_character_orders_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.MarketV1CharacterOrdersHistoric(token.CharacterId, page), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 3600)); IList <EsiV1MarketCharacterHistoricOrders> esiModel = JsonConvert.DeserializeObject <IList <EsiV1MarketCharacterHistoricOrders> >(esiRaw.Model); IList <V1MarketCharacterHistoricOrders> mapped = _mapper.Map <IList <EsiV1MarketCharacterHistoricOrders>, IList <V1MarketCharacterHistoricOrders> >(esiModel); return(new PagedModel <V1MarketCharacterHistoricOrders> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }
public async Task <V3CalendarEvent> EventAsync(SsoToken token, int eventId) { StaticMethods.CheckToken(token, CalendarScopes.esi_calendar_read_calendar_events_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.CalendarV3Event(token.CharacterId, eventId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 5)); EsiV3CalendarEvent esiModel = JsonConvert.DeserializeObject <EsiV3CalendarEvent>(esiRaw.Model); return(_mapper.Map <V3CalendarEvent>(esiModel)); }
public async Task <V3ClonesClone> ClonesAsync(SsoToken token) { StaticMethods.CheckToken(token, CloneScopes.esi_clones_read_clones_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.ClonesV3Clones(token.CharacterId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 120)); EsiV3ClonesClone esiClonesClone = JsonConvert.DeserializeObject <EsiV3ClonesClone>(esiRaw.Model); return(_mapper.Map <V3ClonesClone>(esiClonesClone)); }
public async Task <IList <V1IndustryCorporationObserver> > CorporationObserverAsync(SsoToken token, int corporationId, long observerId, int page) { StaticMethods.CheckToken(token, IndustryScopes.esi_industry_read_corporation_mining_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.IndustryV1CorporationObserver(corporationId, observerId, page), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 3600)); IList <EsiV1IndustryCorporationObserver> esiModel = JsonConvert.DeserializeObject <IList <EsiV1IndustryCorporationObserver> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1IndustryCorporationObserver>, IList <V1IndustryCorporationObserver> >(esiModel)); }
public async Task <IList <int> > ActiveImplantsAsync(SsoToken token) { StaticMethods.CheckToken(token, CloneScopes.esi_clones_read_implants_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.ClonesV3ActiveImplants(token.CharacterId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 300)); return(JsonConvert.DeserializeObject <IList <int> >(esiRaw.Model)); }
public IList <V1IndustryFacility> Facilities() { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.IndustryV1Facilities(), _testing); EsiModel esiRaw = PollyPolicies.WebExceptionRetryWithFallback.Execute(() => _webClient.Get(StaticMethods.CreateHeaders(), url, 3600)); IList <EsiV1IndustryFacility> esiModel = JsonConvert.DeserializeObject <IList <EsiV1IndustryFacility> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1IndustryFacility>, IList <V1IndustryFacility> >(esiModel)); }
public async Task <V1PlanetaryInteractionSchematic> SchematicAsync(int schematicId) { string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.PlanetaryInteractionV1Schematics(schematicId), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(), url, 3600)); EsiV1PlanetaryInteractionSchematic esiSchematic = JsonConvert.DeserializeObject <EsiV1PlanetaryInteractionSchematic>(esiRaw.Model); return(_mapper.Map <V1PlanetaryInteractionSchematic>(esiSchematic)); }
public async Task <IList <V1IndustryCharacter> > CharacterAsync(SsoToken token, bool includeCompletedJobs) { StaticMethods.CheckToken(token, IndustryScopes.esi_industry_read_character_jobs_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.IndustryV1CharacterJobs(token.CharacterId, includeCompletedJobs), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 300)); IList <EsiV1IndustryCharacter> esiModel = JsonConvert.DeserializeObject <IList <EsiV1IndustryCharacter> >(esiRaw.Model); return(_mapper.Map <IList <EsiV1IndustryCharacter>, IList <V1IndustryCharacter> >(esiModel)); }
public async Task <PagedModel <V1BookmarksCorporationFolder> > CorporationBookmarkFoldersAsync(SsoToken token, int corporationId, int page) { StaticMethods.CheckToken(token, BookmarkScopes.esi_bookmarks_read_corporation_bookmarks_v1); string url = StaticConnectionStrings.CheckTestingUrl(StaticConnectionStrings.BookmarksV1CorporationsFolders(corporationId, page), _testing); EsiModel esiRaw = await PollyPolicies.WebExceptionRetryWithFallbackAsync.ExecuteAsync(async() => await _webClient.GetAsync(StaticMethods.CreateHeaders(token), url, 3600)); IList <EsiV1BookmarksCorporationFolder> esiModel = JsonConvert.DeserializeObject <IList <EsiV1BookmarksCorporationFolder> >(esiRaw.Model); IList <V1BookmarksCorporationFolder> mapped = _mapper.Map <IList <EsiV1BookmarksCorporationFolder>, IList <V1BookmarksCorporationFolder> >(esiModel); return(new PagedModel <V1BookmarksCorporationFolder> { Model = mapped, MaxPages = esiRaw.MaxPages, CurrentPage = page }); }