@lgriffin/esi.ts 1.0.0 โ 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DOCUMENTATION.md +106 -0
- package/LICENSE +26 -0
- package/README.md +934 -125
- package/TESTING.md +523 -0
- package/demo/examples.ts +250 -0
- package/demo/flexible-examples.ts +166 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +106 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1493 -0
- package/docs/classes/src_EsiClient.EsiClient.html +48 -0
- package/docs/classes/src_EsiClientBuilder.CustomEsiClient.html +43 -0
- package/docs/classes/src_EsiClientBuilder.EsiApiFactory.html +23 -0
- package/docs/classes/src_EsiClientBuilder.EsiClientBuilder.html +15 -0
- package/docs/classes/src_api_alliances_getAllianceById.AllianceByIdApi.html +3 -0
- package/docs/classes/src_api_alliances_getAllianceContactLabels.AllianceContactLabelsApi.html +3 -0
- package/docs/classes/src_api_alliances_getAllianceContacts.AllianceContactsApi.html +3 -0
- package/docs/classes/src_api_alliances_getAllianceCorporations.AllianceCorporationsApi.html +3 -0
- package/docs/classes/src_api_alliances_getAllianceIcons.AllianceIconsApi.html +3 -0
- package/docs/classes/src_api_alliances_getAlliances.AllAlliancesApi.html +3 -0
- package/docs/classes/src_api_assets_getCharacterAssets.GetCharacterAssetsApi.html +3 -0
- package/docs/classes/src_api_assets_getCorporationAssets.GetCorporationAssetsApi.html +3 -0
- package/docs/classes/src_api_assets_postCharacterAssetLocations.PostCharacterAssetLocationsApi.html +3 -0
- package/docs/classes/src_api_assets_postCharacterAssetNames.PostCharacterAssetNamesApi.html +3 -0
- package/docs/classes/src_api_assets_postCorporationAssetLocations.PostCorporationAssetLocationsApi.html +3 -0
- package/docs/classes/src_api_assets_postCorporationAssetNames.PostCorporationAssetNamesApi.html +3 -0
- package/docs/classes/src_api_bookmarks_getCharacterBookmarkFolders.CharacterBookmarkFoldersApi.html +3 -0
- package/docs/classes/src_api_bookmarks_getCharacterBookmarks.CharacterBookmarksApi.html +3 -0
- package/docs/classes/src_api_bookmarks_getCorporationBookmarkFolders.CorporationBookmarkFoldersApi.html +3 -0
- package/docs/classes/src_api_bookmarks_getCorporationBookmarks.CorporationBookmarksApi.html +3 -0
- package/docs/classes/src_api_calendar_getCalendarEventById.GetCalendarEventByIdApi.html +3 -0
- package/docs/classes/src_api_calendar_getCalendarEvents.GetCalendarEventsApi.html +3 -0
- package/docs/classes/src_api_calendar_getEventAttendees.GetEventAttendeesApi.html +3 -0
- package/docs/classes/src_api_calendar_respondToCalendarEvent.RespondToCalendarEventApi.html +3 -0
- package/docs/classes/src_api_characters_getAgentsResearch.GetAgentsResearchApi.html +3 -0
- package/docs/classes/src_api_characters_getBlueprints.GetBlueprintsApi.html +3 -0
- package/docs/classes/src_api_characters_getCharacterPublicInfo.GetCharacterPublicInfoApi.html +3 -0
- package/docs/classes/src_api_characters_getCharacterRoles.GetCharacterRolesApi.html +3 -0
- package/docs/classes/src_api_characters_getCharacterStandings.GetCharacterStandingsApi.html +3 -0
- package/docs/classes/src_api_characters_getCharacterTitles.GetCharacterTitlesApi.html +3 -0
- package/docs/classes/src_api_characters_getContactNotifications.GetContactNotificationsApi.html +3 -0
- package/docs/classes/src_api_characters_getCorporationHistory.GetCorporationHistoryApi.html +3 -0
- package/docs/classes/src_api_characters_getJumpFatigue.GetJumpFatigueApi.html +3 -0
- package/docs/classes/src_api_characters_getMedals.GetMedalsApi.html +3 -0
- package/docs/classes/src_api_characters_getNotifications.GetNotificationsApi.html +3 -0
- package/docs/classes/src_api_characters_getPortrait.GetPortraitApi.html +3 -0
- package/docs/classes/src_api_characters_postCSPAChargeCost.PostCspaChargeCostApi.html +3 -0
- package/docs/classes/src_api_characters_postCharacterAffiliations.PostCharacterAffiliationApi.html +3 -0
- package/docs/classes/src_api_clones_getClones.GetClonesApi.html +3 -0
- package/docs/classes/src_api_clones_getImplants.GetImplantsApi.html +3 -0
- package/docs/classes/src_api_clones_postJumpCloneActivation.PostJumpCloneActivationApi.html +3 -0
- package/docs/classes/src_api_contacts_deleteCharacterContacts.deleteCharacterContacts.html +3 -0
- package/docs/classes/src_api_contacts_getAllianceContactLabels.getAllianceContactLabels.html +3 -0
- package/docs/classes/src_api_contacts_getAllianceContacts.getAllianceContacts.html +3 -0
- package/docs/classes/src_api_contacts_getCharacterContactLabels.getCharacterContactLabels.html +3 -0
- package/docs/classes/src_api_contacts_getCharacterContacts.getCharacterContacts.html +3 -0
- package/docs/classes/src_api_contacts_getCorporationContactLabels.getCorporationContactLabels.html +3 -0
- package/docs/classes/src_api_contacts_getCorporationContacts.getCorporationContacts.html +3 -0
- package/docs/classes/src_api_contacts_postCharacterContacts.postCharacterContacts.html +3 -0
- package/docs/classes/src_api_contacts_putCharacterContacts.putCharacterContacts.html +3 -0
- package/docs/classes/src_api_contracts_getCharacterContractBids.GetCharacterContractBidsApi.html +3 -0
- package/docs/classes/src_api_contracts_getCharacterContractItems.GetCharacterContractItemsApi.html +3 -0
- package/docs/classes/src_api_contracts_getCharacterContracts.GetCharacterContractsApi.html +3 -0
- package/docs/classes/src_api_contracts_getCorporationContractBids.GetCorporationContractBidsApi.html +3 -0
- package/docs/classes/src_api_contracts_getCorporationContractItems.GetCorporationContractItemsApi.html +3 -0
- package/docs/classes/src_api_contracts_getCorporationContracts.GetCorporationContractsApi.html +3 -0
- package/docs/classes/src_api_contracts_getPublicContractBids.GetPublicContractBidsApi.html +3 -0
- package/docs/classes/src_api_contracts_getPublicContractItems.GetPublicContractItemsApi.html +3 -0
- package/docs/classes/src_api_contracts_getPublicContracts.GetPublicContractsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationAllianceHistory.GetCorporationAllianceHistoryApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationAlscLogs.GetCorporationAlscLogsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationBlueprints.GetCorporationBlueprintsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationDivisions.GetCorporationDivisionsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationFacilities.GetCorporationFacilitiesApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationIcon.GetCorporationIconApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationInfo.GetCorporationInfoApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationIssuedMedals.GetCorporationIssuedMedalsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMedals.GetCorporationMedalsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMemberLimit.GetCorporationMemberLimitApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMemberRoles.GetCorporationMemberRolesApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMemberRolesHistory.GetCorporationMemberRolesHistoryApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMemberTracking.GetCorporationMemberTrackingApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMembers.GetCorporationMembersApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationMembersTitles.GetCorporationMembersTitlesApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationProjects.GetCorporationProjectsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationShareholders.GetCorporationShareholdersApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationStandings.GetCorporationStandingsApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationStarbaseDetail.GetCorporationStarbaseDetailApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationStarbases.GetCorporationStarbasesApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationStructures.GetCorporationStructuresApi.html +3 -0
- package/docs/classes/src_api_corporations_getCorporationTitles.GetCorporationTitlesApi.html +3 -0
- package/docs/classes/src_api_corporations_getNpcCorporations.GetNpcCorporationsApi.html +3 -0
- package/docs/classes/src_api_dogma_getDogmaAttributeById.DogmaAttributeByIdApi.html +3 -0
- package/docs/classes/src_api_dogma_getDogmaAttributes.DogmaAttributesApi.html +3 -0
- package/docs/classes/src_api_dogma_getDogmaDynamicItemAttributes.DogmaDynamicItemApi.html +3 -0
- package/docs/classes/src_api_dogma_getDogmaEffectById.DogmaEffectByIdApi.html +3 -0
- package/docs/classes/src_api_dogma_getDogmaEffects.DogmaEffectsApi.html +3 -0
- package/docs/classes/src_api_factions_getCharacterFactionWarfareStats.GetCharacterFactionWarfareStatsApi.html +3 -0
- package/docs/classes/src_api_factions_getCharacterLeaderboards.GetCharacterLeaderboardsApi.html +3 -0
- package/docs/classes/src_api_factions_getCorporationFactionWarfareStats.GetCorporationFactionWarfareStatsApi.html +3 -0
- package/docs/classes/src_api_factions_getCorporationLeaderboards.GetCorporationLeaderboardsApi.html +3 -0
- package/docs/classes/src_api_factions_getFactionLeaderboards.GetFactionLeaderboardsApi.html +3 -0
- package/docs/classes/src_api_factions_getFactionWarfareStats.getFactionWarfareStats.html +3 -0
- package/docs/classes/src_api_factions_getFactionWarfareSystems.FactionWarfareSystemsApi.html +3 -0
- package/docs/classes/src_api_factions_getFactionWarfareWars.FactionWarfareWarsApi.html +3 -0
- package/docs/classes/src_api_fittings_deleteCharacterFitting.DeleteCharacterFittingApi.html +3 -0
- package/docs/classes/src_api_fittings_getCharacterFittings.GetCharacterFittingsApi.html +3 -0
- package/docs/classes/src_api_fittings_postCharacterFittings.PostCharacterFittingApi.html +3 -0
- package/docs/classes/src_api_fleets_deleteFleetMember.DeleteFleetMemberApi.html +3 -0
- package/docs/classes/src_api_fleets_deleteFleetSquad.DeleteFleetSquadApi.html +3 -0
- package/docs/classes/src_api_fleets_deleteFleetWing.DeleteFleetWingApi.html +3 -0
- package/docs/classes/src_api_fleets_getCharacterFleetInfo.GetCharacterFleetInfoApi.html +3 -0
- package/docs/classes/src_api_fleets_getFleetInfo.GetFleetInfoApi.html +3 -0
- package/docs/classes/src_api_fleets_getFleetMembers.GetFleetMembersApi.html +3 -0
- package/docs/classes/src_api_fleets_getFleetWings.GetFleetWingsApi.html +3 -0
- package/docs/classes/src_api_fleets_postFleetInvitation.PostFleetInvitationApi.html +3 -0
- package/docs/classes/src_api_fleets_postFleetSquad.PostFleetSquadApi.html +3 -0
- package/docs/classes/src_api_fleets_postFleetWing.PostFleetWingApi.html +3 -0
- package/docs/classes/src_api_fleets_putFleetMember.PutFleetMemberApi.html +3 -0
- package/docs/classes/src_api_fleets_putFleetSquad.PutFleetSquadApi.html +3 -0
- package/docs/classes/src_api_fleets_putFleetWing.PutFleetWingApi.html +3 -0
- package/docs/classes/src_api_fleets_updateFleet.UpdateFleetApi.html +3 -0
- package/docs/classes/src_api_incursions_getIncursions.IncursionsApi.html +3 -0
- package/docs/classes/src_api_industry_getCharacterIndustryJobs.GetCharacterIndustryJobsApi.html +3 -0
- package/docs/classes/src_api_industry_getCharacterMiningLedger.GetCharacterMiningLedgerApi.html +3 -0
- package/docs/classes/src_api_industry_getCorporationIndustryJobs.GetCorporationIndustryJobsApi.html +3 -0
- package/docs/classes/src_api_industry_getCorporationMiningObserver.GetCorporationMiningObserverApi.html +3 -0
- package/docs/classes/src_api_industry_getCorporationMiningObservers.GetCorporationMiningObserversApi.html +3 -0
- package/docs/classes/src_api_industry_getIndustryFacilities.GetIndustryFacilitiesApi.html +3 -0
- package/docs/classes/src_api_industry_getIndustrySystems.GetIndustrySystemsApi.html +3 -0
- package/docs/classes/src_api_industry_getMoonExtractionTimers.GetMoonExtractionTimersApi.html +3 -0
- package/docs/classes/src_api_insurance_getInsurancePrices.InsuranceApi.html +3 -0
- package/docs/classes/src_api_killmails_getCharacterRecentKillmails.GetCharacterRecentKillmailsApi.html +3 -0
- package/docs/classes/src_api_killmails_getCorporationRecentKillmails.GetCorporationRecentKillmailsApi.html +3 -0
- package/docs/classes/src_api_killmails_getKillmail.GetKillmailApi.html +3 -0
- package/docs/classes/src_api_location_getCharacterLocation.GetCharacterLocationApi.html +3 -0
- package/docs/classes/src_api_location_getCharacterOnline.GetCharacterOnlineApi.html +3 -0
- package/docs/classes/src_api_location_getCharacterShip.GetCharacterShipApi.html +3 -0
- package/docs/classes/src_api_loyalty_getLoyaltyPoints.GetLoyaltyPointsApi.html +3 -0
- package/docs/classes/src_api_loyalty_getLoyaltyStoreOffers.GetLoyaltyStoreOffersApi.html +3 -0
- package/docs/classes/src_api_mail_deleteCharacterMail.DeleteCharacterMailApi.html +3 -0
- package/docs/classes/src_api_mail_deleteCharacterMailLabel.DeleteCharacterMailLabelApi.html +3 -0
- package/docs/classes/src_api_mail_getCharacterMail.GetCharacterMailApi.html +3 -0
- package/docs/classes/src_api_mail_getCharacterMailHeaders.GetCharacterMailHeadersApi.html +3 -0
- package/docs/classes/src_api_mail_getCharacterMailLabels.GetCharacterMailLabelsApi.html +3 -0
- package/docs/classes/src_api_mail_getCharacterMailingLists.GetCharacterMailingListsApi.html +3 -0
- package/docs/classes/src_api_mail_postCharacterMail.PostCharacterMailApi.html +3 -0
- package/docs/classes/src_api_mail_postCharacterMailLabels.PostCharacterMailLabelsApi.html +3 -0
- package/docs/classes/src_api_mail_putCharacterMail.PutCharacterMailApi.html +3 -0
- package/docs/classes/src_api_market_getCharacterOrderHistory.getCharacterOrderHistory.html +3 -0
- package/docs/classes/src_api_market_getCharacterOrders.getCharacterOrders.html +3 -0
- package/docs/classes/src_api_market_getCorporationOrderHistory.getCorporationOrderHistory.html +3 -0
- package/docs/classes/src_api_market_getCorporationOrders.getCorporationOrders.html +3 -0
- package/docs/classes/src_api_market_getMarketGroupInformation.getMarketGroupInformation.html +3 -0
- package/docs/classes/src_api_market_getMarketGroups.getMarketGroups.html +3 -0
- package/docs/classes/src_api_market_getMarketHistory.getMarketHistory.html +3 -0
- package/docs/classes/src_api_market_getMarketOrders.getMarketOrders.html +3 -0
- package/docs/classes/src_api_market_getMarketOrdersInStructure.getMarketOrdersInStructure.html +3 -0
- package/docs/classes/src_api_market_getMarketPrices.getMarketPrices.html +3 -0
- package/docs/classes/src_api_market_getMarketTypes.getMarketTypes.html +3 -0
- package/docs/classes/src_api_meta_getSwaggerJson.GetSwaggerJsonApi.html +3 -0
- package/docs/classes/src_api_meta_getSwaggerYaml.GetSwaggerYamlApi.html +3 -0
- package/docs/classes/src_api_opportunities_getCharacterOpportunities.GetCharacterOpportunitiesApi.html +3 -0
- package/docs/classes/src_api_opportunities_getOpportunitiesGroupById.GetOpportunitiesGroupByIdApi.html +3 -0
- package/docs/classes/src_api_opportunities_getOpportunitiesGroups.GetOpportunitiesGroupsApi.html +3 -0
- package/docs/classes/src_api_opportunities_getOpportunitiesTaskById.GetOpportunitiesTaskByIdApi.html +3 -0
- package/docs/classes/src_api_opportunities_getOpportunitiesTasks.GetOpportunitiesTasksApi.html +3 -0
- package/docs/classes/src_api_pi_getColonies.GetColoniesApi.html +3 -0
- package/docs/classes/src_api_pi_getColonyLayout.GetColonyLayoutApi.html +3 -0
- package/docs/classes/src_api_pi_getCorporationCustomsOffices.GetCorporationCustomsOfficesApi.html +3 -0
- package/docs/classes/src_api_pi_getSchematicInformation.GetSchematicInformationApi.html +3 -0
- package/docs/classes/src_api_route_getRoute.RouteApi.html +3 -0
- package/docs/classes/src_api_search_getCharacterSearch.CharacterSearchApi.html +3 -0
- package/docs/classes/src_api_skills_getCharacterAttributes.GetCharacterAttributesApi.html +3 -0
- package/docs/classes/src_api_skills_getCharacterSkillQueue.GetCharacterSkillQueueApi.html +3 -0
- package/docs/classes/src_api_skills_getCharacterSkills.GetCharacterSkillsApi.html +3 -0
- package/docs/classes/src_api_sovereignty_getSovereigntyCampaigns.SovereigntyCampaignsApi.html +3 -0
- package/docs/classes/src_api_sovereignty_getSovereigntyMap.SovereigntyMapApi.html +3 -0
- package/docs/classes/src_api_sovereignty_getSovereigntyStructures.SovereigntyStructuresApi.html +3 -0
- package/docs/classes/src_api_status_getStatus.GetStatusApi.html +3 -0
- package/docs/classes/src_api_ui_postAutopilotWaypoint.PostAutopilotWaypointApi.html +3 -0
- package/docs/classes/src_api_ui_postOpenContractWindow.PostOpenContractWindowApi.html +3 -0
- package/docs/classes/src_api_ui_postOpenInformationWindow.PostOpenInformationWindowApi.html +3 -0
- package/docs/classes/src_api_ui_postOpenMarketDetailsWindow.PostOpenMarketDetailsWindowApi.html +3 -0
- package/docs/classes/src_api_ui_postOpenNewMailWindow.PostOpenNewMailWindowApi.html +3 -0
- package/docs/classes/src_api_universe_getAncestries.UniverseAncestriesApi.html +3 -0
- package/docs/classes/src_api_universe_getAsteroidBeltInfo.UniverseAsteroidBeltApi.html +3 -0
- package/docs/classes/src_api_universe_getBloodlines.UniverseBloodlinesApi.html +3 -0
- package/docs/classes/src_api_universe_getConstellationById.UniverseConstellationByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getConstellations.UniverseConstellationsApi.html +3 -0
- package/docs/classes/src_api_universe_getFactions.UniverseFactionsApi.html +3 -0
- package/docs/classes/src_api_universe_getGraphicById.UniverseGraphicByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getGraphics.UniverseGraphicsApi.html +3 -0
- package/docs/classes/src_api_universe_getItemCategories.UniverseCategoriesApi.html +3 -0
- package/docs/classes/src_api_universe_getItemCategoryById.UniverseCategoryByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getItemGroupById.UniverseItemGroupByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getItemGroups.UniverseItemGroupsApi.html +3 -0
- package/docs/classes/src_api_universe_getMoonById.UniverseMoonByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getPlanetById.UniversePlanetByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getRaces.UniverseRacesApi.html +3 -0
- package/docs/classes/src_api_universe_getRegionById.UniverseRegionByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getStarById.UniverseStarByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getStargateById.UniverseStargateByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getStationById.UniverseStationByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getStructureById.UniverseStructureByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getStructures.UniverseStructuresApi.html +3 -0
- package/docs/classes/src_api_universe_getSystemById.UniverseSystemByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getSystemJumps.UniverseSystemJumpsApi.html +3 -0
- package/docs/classes/src_api_universe_getSystemKills.UniverseSystemKillsApi.html +3 -0
- package/docs/classes/src_api_universe_getSystems.UniverseSystemsApi.html +3 -0
- package/docs/classes/src_api_universe_getTypeById.UniverseTypeByIdApi.html +3 -0
- package/docs/classes/src_api_universe_getTypes.UniverseTypesApi.html +3 -0
- package/docs/classes/src_api_universe_postBulkNamesToIds.PostBulkNamesToIdsApi.html +3 -0
- package/docs/classes/src_api_universe_postNamesAndCategories.PostNamesAndCategoriesApi.html +3 -0
- package/docs/classes/src_api_wallet_getCharacterWallet.GetCharacterWalletApi.html +3 -0
- package/docs/classes/src_api_wallet_getCharacterWalletJournal.GetCharacterWalletJournalApi.html +3 -0
- package/docs/classes/src_api_wallet_getCharacterWalletTransactions.GetCharacterWalletTransactionsApi.html +3 -0
- package/docs/classes/src_api_wallet_getCorporationWalletJournal.GetCorporationWalletJournalApi.html +3 -0
- package/docs/classes/src_api_wallet_getCorporationWalletTransactions.GetCorporationWalletTransactionsApi.html +3 -0
- package/docs/classes/src_api_wallet_getCorporationWallets.GetCorporationWalletsApi.html +3 -0
- package/docs/classes/src_api_wars_getWarById.WarByIdApi.html +3 -0
- package/docs/classes/src_api_wars_getWarKillmails.WarKillmailsApi.html +3 -0
- package/docs/classes/src_api_wars_getWars.WarsApi.html +3 -0
- package/docs/classes/src_builders_AllianceApiBuilder.AllianceApiBuilder.html +3 -0
- package/docs/classes/src_builders_AssetsApiBuilder.AssetsApiBuilder.html +3 -0
- package/docs/classes/src_builders_BookmarkApiBuilder.BookmarkApiBuilder.html +3 -0
- package/docs/classes/src_builders_CalendarApiBuilder.CalendarApiBuilder.html +3 -0
- package/docs/classes/src_builders_CharacterApiBuilder.CharacterApiBuilder.html +3 -0
- package/docs/classes/src_builders_ClonesApiBuilder.ClonesApiBuilder.html +3 -0
- package/docs/classes/src_builders_ContactsApiBuilder.ContactsApiBuilder.html +3 -0
- package/docs/classes/src_builders_ContractsApiBuilder.ContractsApiBuilder.html +3 -0
- package/docs/classes/src_builders_CorporationsApiBuilder.CorporationsApiBuilder.html +3 -0
- package/docs/classes/src_builders_DogmaApiBuilder.DogmaAPIBuilder.html +3 -0
- package/docs/classes/src_builders_FactionApiBuilder.FactionAPIBuilder.html +3 -0
- package/docs/classes/src_builders_FittingsApiBuilder.FittingsApiBuilder.html +3 -0
- package/docs/classes/src_builders_FleetApiBuilder.FleetApiBuilder.html +3 -0
- package/docs/classes/src_builders_IncursionsApiBuilder.IncursionsApiBuilder.html +3 -0
- package/docs/classes/src_builders_IndustryApiBuilder.IndustryApiBuilder.html +3 -0
- package/docs/classes/src_builders_InsuranceApiBuilder.InsuranceAPIBuilder.html +3 -0
- package/docs/classes/src_builders_KillmailsBuilder.KillmailsApiBuilder.html +3 -0
- package/docs/classes/src_builders_LocationApiBuilder.LocationApiBuilder.html +3 -0
- package/docs/classes/src_builders_LoyaltyApiBuilder.LoyaltyApiBuilder.html +3 -0
- package/docs/classes/src_builders_MailApiBuilder.MailApiBuilder.html +3 -0
- package/docs/classes/src_builders_MarketApiBuilder.MarketApiBuilder.html +3 -0
- package/docs/classes/src_builders_MetaApiBuilder.MetaApiBuilder.html +3 -0
- package/docs/classes/src_builders_OpportunitiesApiBuilder.OpportunitiesApiBuilder.html +3 -0
- package/docs/classes/src_builders_PiApiBuilder.PiApiBuilder.html +3 -0
- package/docs/classes/src_builders_RouteApiBuilder.RouteApiBuilder.html +3 -0
- package/docs/classes/src_builders_SearchApiBuilder.SearchApiBuilder.html +3 -0
- package/docs/classes/src_builders_SkillsApiBuilder.SkillsApiBuilder.html +3 -0
- package/docs/classes/src_builders_SovereigntyApiBuilder.SovereigntyApiBuilder.html +3 -0
- package/docs/classes/src_builders_StatusApiBuilder.StatusAPIBuilder.html +3 -0
- package/docs/classes/src_builders_UiApiBuilder.UiApiBuilder.html +3 -0
- package/docs/classes/src_builders_UniverseApiBuilder.UniverseAPIBuilder.html +3 -0
- package/docs/classes/src_builders_WalletApiBuilder.WalletApiBuilder.html +3 -0
- package/docs/classes/src_builders_WarsAPIBuilder.WarsAPIBuilder.html +3 -0
- package/docs/classes/src_clients_AllianceClient.AllianceClient.html +10 -0
- package/docs/classes/src_clients_AssetsClient.AssetsClient.html +8 -0
- package/docs/classes/src_clients_BookmarkClient.BookmarkClient.html +6 -0
- package/docs/classes/src_clients_CalendarClient.CalendarClient.html +6 -0
- package/docs/classes/src_clients_CharacterClient.CharacterClient.html +16 -0
- package/docs/classes/src_clients_ClonesClient.ClonesClient.html +5 -0
- package/docs/classes/src_clients_ContactsClient.ContactsClient.html +11 -0
- package/docs/classes/src_clients_ContractsClient.ContractsClient.html +11 -0
- package/docs/classes/src_clients_CorporationsClient.CorporationsClient.html +25 -0
- package/docs/classes/src_clients_DogmaClient.DogmaClient.html +7 -0
- package/docs/classes/src_clients_FactionClient.FactionClient.html +10 -0
- package/docs/classes/src_clients_FittingsClient.FittingsClient.html +5 -0
- package/docs/classes/src_clients_FleetClient.FleetClient.html +16 -0
- package/docs/classes/src_clients_IncursionsClient.IncursionsClient.html +3 -0
- package/docs/classes/src_clients_IndustryClient.IndustryClient.html +10 -0
- package/docs/classes/src_clients_InsuranceClient.InsuranceClient.html +3 -0
- package/docs/classes/src_clients_KillmailsClient.KillmailsClient.html +5 -0
- package/docs/classes/src_clients_LocationClient.LocationClient.html +5 -0
- package/docs/classes/src_clients_LoyaltyClient.LoyaltyClient.html +4 -0
- package/docs/classes/src_clients_MailClient.MailClient.html +11 -0
- package/docs/classes/src_clients_MarketClient.MarketClient.html +13 -0
- package/docs/classes/src_clients_MetaClient.MetaClient.html +6 -0
- package/docs/classes/src_clients_OpportunitiesClient.OpportunitiesClient.html +7 -0
- package/docs/classes/src_clients_PiClient.PIClient.html +6 -0
- package/docs/classes/src_clients_RouteClient.RouteClient.html +3 -0
- package/docs/classes/src_clients_SearchClient.SearchClient.html +3 -0
- package/docs/classes/src_clients_SkillsClient.CharacterSkillsClient.html +5 -0
- package/docs/classes/src_clients_SovereigntyClient.SovereigntyClient.html +5 -0
- package/docs/classes/src_clients_StatusClient.StatusClient.html +3 -0
- package/docs/classes/src_clients_UiClient.UIClient.html +7 -0
- package/docs/classes/src_clients_UniverseClient.UniverseClient.html +31 -0
- package/docs/classes/src_clients_WalletClient.WalletClient.html +8 -0
- package/docs/classes/src_clients_WarsClient.WarsClient.html +5 -0
- package/docs/classes/src_core_ApiClient.ApiClient.html +4 -0
- package/docs/classes/src_core_ApiClientBuilder.ApiClientBuilder.html +6 -0
- package/docs/classes/src_core_ApiError.ApiError.html +3 -0
- package/docs/classes/src_core_cache_ETagCacheManager.ETagCacheManager.html +22 -0
- package/docs/classes/src_core_container_Container.CircularDependencyError.html +2 -0
- package/docs/classes/src_core_container_Container.Container.html +20 -0
- package/docs/classes/src_core_errors_ApiError.ApiError.html +12 -0
- package/docs/classes/src_core_errors_ApiError.ErrorHandler.html +5 -0
- package/docs/classes/src_core_factory_ApiFactory.ApiFactory.html +20 -0
- package/docs/classes/src_core_factory_ApiFactory.ApiModule.html +6 -0
- package/docs/classes/src_core_util_headersUtil.default.html +11 -0
- package/docs/classes/src_testing_TestDataFactory.TestDataFactory.html +47 -0
- package/docs/classes/src_testing_TestHelpers.MockApiClient.html +3 -0
- package/docs/classes/src_testing_TestHelpers.TestAssertions.html +6 -0
- package/docs/classes/src_testing_TestHelpers.TestDataFactory.html +6 -0
- package/docs/classes/src_testing_TestHelpers.TestScenarios.html +5 -0
- package/docs/classes/src_types_winston_loggly_bulk.Loggly.html +2 -0
- package/docs/enums/src_core_errors_ApiError.ApiErrorType.html +11 -0
- package/docs/functions/src.displayCharacterProfile.html +2 -0
- package/docs/functions/src.getCompleteCharacterProfile.html +4 -0
- package/docs/functions/src_config_configManager.getConfig.html +1 -0
- package/docs/functions/src_config_jest_jest_setup.getClient.html +1 -0
- package/docs/functions/src_core_ApiRequestHandler.getETagCache.html +1 -0
- package/docs/functions/src_core_ApiRequestHandler.handleRequest.html +1 -0
- package/docs/functions/src_core_ApiRequestHandler.handleRequestBody.html +1 -0
- package/docs/functions/src_core_ApiRequestHandler.initializeETagCache.html +1 -0
- package/docs/functions/src_core_ApiRequestHandler.resetETagCache.html +1 -0
- package/docs/functions/src_core_container_Container.Inject.html +1 -0
- package/docs/functions/src_core_container_Container.Injectable.html +1 -0
- package/docs/functions/src_core_logger_loggerUtil.logDebug.html +1 -0
- package/docs/functions/src_core_logger_loggerUtil.logError.html +1 -0
- package/docs/functions/src_core_logger_loggerUtil.logInfo.html +1 -0
- package/docs/functions/src_core_logger_loggerUtil.logWarn.html +1 -0
- package/docs/functions/src_core_util_error.buildError.html +1 -0
- package/docs/functions/src_core_util_file.checkForConfig.html +1 -0
- package/docs/functions/src_core_util_file.getSettings.html +1 -0
- package/docs/functions/src_core_util_file.log.html +1 -0
- package/docs/functions/src_core_util_inputValidation.inputValidation.html +1 -0
- package/docs/functions/src_core_util_network.request.html +1 -0
- package/docs/functions/src_core_util_request.inputValidation.html +1 -0
- package/docs/functions/src_core_util_request.request.html +1 -0
- package/docs/functions/src_core_util_testHelpers.getBody.html +1 -0
- package/docs/functions/src_core_util_testHelpers.getHeaders.html +1 -0
- package/docs/functions/src_core_util_testHelpers.mockApiCall.html +1 -0
- package/docs/functions/src_testing_TestHelpers.createMockApiClient.html +1 -0
- package/docs/functions/src_testing_TestHelpers.getBody.html +1 -0
- package/docs/functions/src_testing_TestHelpers.getHeaders.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +272 -0
- package/docs/interfaces/src_EsiClient.EsiClientConfig.html +8 -0
- package/docs/interfaces/src_core_IAPIBuilder.IAPIBuilder.html +2 -0
- package/docs/interfaces/src_core_IAPIBuilder.IApiClient.html +3 -0
- package/docs/interfaces/src_core_IAPIBuilder.IApiService.html +3 -0
- package/docs/interfaces/src_core_cache_ETagCacheManager.CacheEntry.html +6 -0
- package/docs/interfaces/src_core_cache_ETagCacheManager.ETagCacheConfig.html +6 -0
- package/docs/interfaces/src_core_container_Container.ContainerConfig.html +3 -0
- package/docs/interfaces/src_core_factory_ApiFactory.ApiClientConfig.html +7 -0
- package/docs/interfaces/src_core_factory_ApiFactory.ApiModuleConfig.html +4 -0
- package/docs/interfaces/src_testing_TestHelpers.MockConfig.html +6 -0
- package/docs/interfaces/src_types_api_responses.AllianceContact.html +5 -0
- package/docs/interfaces/src_types_api_responses.AllianceContactLabel.html +3 -0
- package/docs/interfaces/src_types_api_responses.AllianceIcon.html +3 -0
- package/docs/interfaces/src_types_api_responses.AllianceInfo.html +9 -0
- package/docs/interfaces/src_types_api_responses.ApiResponse.html +4 -0
- package/docs/interfaces/src_types_api_responses.AssetLocation.html +3 -0
- package/docs/interfaces/src_types_api_responses.AssetName.html +3 -0
- package/docs/interfaces/src_types_api_responses.CharacterAsset.html +9 -0
- package/docs/interfaces/src_types_api_responses.CharacterAttributes.html +9 -0
- package/docs/interfaces/src_types_api_responses.CharacterInfo.html +13 -0
- package/docs/interfaces/src_types_api_responses.CharacterPortrait.html +5 -0
- package/docs/interfaces/src_types_api_responses.CharacterSkill.html +5 -0
- package/docs/interfaces/src_types_api_responses.ConstellationInfo.html +6 -0
- package/docs/interfaces/src_types_api_responses.Contract.html +23 -0
- package/docs/interfaces/src_types_api_responses.ContractItem.html +8 -0
- package/docs/interfaces/src_types_api_responses.CorporationInfo.html +16 -0
- package/docs/interfaces/src_types_api_responses.ErrorResponse.html +4 -0
- package/docs/interfaces/src_types_api_responses.MailLabel.html +5 -0
- package/docs/interfaces/src_types_api_responses.MailMessage.html +8 -0
- package/docs/interfaces/src_types_api_responses.MarketHistory.html +7 -0
- package/docs/interfaces/src_types_api_responses.MarketOrder.html +12 -0
- package/docs/interfaces/src_types_api_responses.PaginatedResponse.html +5 -0
- package/docs/interfaces/src_types_api_responses.RegionInfo.html +5 -0
- package/docs/interfaces/src_types_api_responses.SkillQueue.html +9 -0
- package/docs/interfaces/src_types_api_responses.SolarSystemInfo.html +10 -0
- package/docs/interfaces/src_types_api_responses.WalletJournal.html +12 -0
- package/docs/interfaces/src_types_api_responses.WalletTransaction.html +11 -0
- package/docs/interfaces/src_types_winston_loggly_bulk.LogglyOptions.html +5 -0
- package/docs/media/LICENSE +26 -0
- package/docs/modules/src.html +22 -0
- package/docs/modules/src_EsiClient.html +4 -0
- package/docs/modules/src_EsiClientBuilder.html +6 -0
- package/docs/modules/src_api_alliances_getAllianceById.html +2 -0
- package/docs/modules/src_api_alliances_getAllianceContactLabels.html +2 -0
- package/docs/modules/src_api_alliances_getAllianceContacts.html +2 -0
- package/docs/modules/src_api_alliances_getAllianceCorporations.html +2 -0
- package/docs/modules/src_api_alliances_getAllianceIcons.html +2 -0
- package/docs/modules/src_api_alliances_getAlliances.html +2 -0
- package/docs/modules/src_api_assets_getCharacterAssets.html +2 -0
- package/docs/modules/src_api_assets_getCorporationAssets.html +2 -0
- package/docs/modules/src_api_assets_postCharacterAssetLocations.html +2 -0
- package/docs/modules/src_api_assets_postCharacterAssetNames.html +2 -0
- package/docs/modules/src_api_assets_postCorporationAssetLocations.html +2 -0
- package/docs/modules/src_api_assets_postCorporationAssetNames.html +2 -0
- package/docs/modules/src_api_bookmarks_getCharacterBookmarkFolders.html +2 -0
- package/docs/modules/src_api_bookmarks_getCharacterBookmarks.html +2 -0
- package/docs/modules/src_api_bookmarks_getCorporationBookmarkFolders.html +2 -0
- package/docs/modules/src_api_bookmarks_getCorporationBookmarks.html +2 -0
- package/docs/modules/src_api_calendar_getCalendarEventById.html +2 -0
- package/docs/modules/src_api_calendar_getCalendarEvents.html +2 -0
- package/docs/modules/src_api_calendar_getEventAttendees.html +2 -0
- package/docs/modules/src_api_calendar_respondToCalendarEvent.html +2 -0
- package/docs/modules/src_api_characters_getAgentsResearch.html +2 -0
- package/docs/modules/src_api_characters_getBlueprints.html +2 -0
- package/docs/modules/src_api_characters_getCharacterPublicInfo.html +2 -0
- package/docs/modules/src_api_characters_getCharacterRoles.html +2 -0
- package/docs/modules/src_api_characters_getCharacterStandings.html +2 -0
- package/docs/modules/src_api_characters_getCharacterTitles.html +2 -0
- package/docs/modules/src_api_characters_getContactNotifications.html +2 -0
- package/docs/modules/src_api_characters_getCorporationHistory.html +2 -0
- package/docs/modules/src_api_characters_getJumpFatigue.html +2 -0
- package/docs/modules/src_api_characters_getMedals.html +2 -0
- package/docs/modules/src_api_characters_getNotifications.html +2 -0
- package/docs/modules/src_api_characters_getPortrait.html +2 -0
- package/docs/modules/src_api_characters_postCSPAChargeCost.html +2 -0
- package/docs/modules/src_api_characters_postCharacterAffiliations.html +2 -0
- package/docs/modules/src_api_clones_getClones.html +2 -0
- package/docs/modules/src_api_clones_getImplants.html +2 -0
- package/docs/modules/src_api_clones_postJumpCloneActivation.html +2 -0
- package/docs/modules/src_api_contacts_deleteCharacterContacts.html +2 -0
- package/docs/modules/src_api_contacts_getAllianceContactLabels.html +2 -0
- package/docs/modules/src_api_contacts_getAllianceContacts.html +2 -0
- package/docs/modules/src_api_contacts_getCharacterContactLabels.html +2 -0
- package/docs/modules/src_api_contacts_getCharacterContacts.html +2 -0
- package/docs/modules/src_api_contacts_getCorporationContactLabels.html +2 -0
- package/docs/modules/src_api_contacts_getCorporationContacts.html +2 -0
- package/docs/modules/src_api_contacts_postCharacterContacts.html +2 -0
- package/docs/modules/src_api_contacts_putCharacterContacts.html +2 -0
- package/docs/modules/src_api_contracts_getCharacterContractBids.html +2 -0
- package/docs/modules/src_api_contracts_getCharacterContractItems.html +2 -0
- package/docs/modules/src_api_contracts_getCharacterContracts.html +2 -0
- package/docs/modules/src_api_contracts_getCorporationContractBids.html +2 -0
- package/docs/modules/src_api_contracts_getCorporationContractItems.html +2 -0
- package/docs/modules/src_api_contracts_getCorporationContracts.html +2 -0
- package/docs/modules/src_api_contracts_getPublicContractBids.html +2 -0
- package/docs/modules/src_api_contracts_getPublicContractItems.html +2 -0
- package/docs/modules/src_api_contracts_getPublicContracts.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationAllianceHistory.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationAlscLogs.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationBlueprints.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationDivisions.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationFacilities.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationIcon.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationInfo.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationIssuedMedals.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMedals.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMemberLimit.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMemberRoles.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMemberRolesHistory.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMemberTracking.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMembers.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationMembersTitles.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationProjects.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationShareholders.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationStandings.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationStarbaseDetail.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationStarbases.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationStructures.html +2 -0
- package/docs/modules/src_api_corporations_getCorporationTitles.html +2 -0
- package/docs/modules/src_api_corporations_getNpcCorporations.html +2 -0
- package/docs/modules/src_api_dogma_getDogmaAttributeById.html +2 -0
- package/docs/modules/src_api_dogma_getDogmaAttributes.html +2 -0
- package/docs/modules/src_api_dogma_getDogmaDynamicItemAttributes.html +2 -0
- package/docs/modules/src_api_dogma_getDogmaEffectById.html +2 -0
- package/docs/modules/src_api_dogma_getDogmaEffects.html +2 -0
- package/docs/modules/src_api_factions_getCharacterFactionWarfareStats.html +2 -0
- package/docs/modules/src_api_factions_getCharacterLeaderboards.html +2 -0
- package/docs/modules/src_api_factions_getCorporationFactionWarfareStats.html +2 -0
- package/docs/modules/src_api_factions_getCorporationLeaderboards.html +2 -0
- package/docs/modules/src_api_factions_getFactionLeaderboards.html +2 -0
- package/docs/modules/src_api_factions_getFactionWarfareStats.html +2 -0
- package/docs/modules/src_api_factions_getFactionWarfareSystems.html +2 -0
- package/docs/modules/src_api_factions_getFactionWarfareWars.html +2 -0
- package/docs/modules/src_api_fittings_deleteCharacterFitting.html +2 -0
- package/docs/modules/src_api_fittings_getCharacterFittings.html +2 -0
- package/docs/modules/src_api_fittings_postCharacterFittings.html +2 -0
- package/docs/modules/src_api_fleets_deleteFleetMember.html +2 -0
- package/docs/modules/src_api_fleets_deleteFleetSquad.html +2 -0
- package/docs/modules/src_api_fleets_deleteFleetWing.html +2 -0
- package/docs/modules/src_api_fleets_getCharacterFleetInfo.html +2 -0
- package/docs/modules/src_api_fleets_getFleetInfo.html +2 -0
- package/docs/modules/src_api_fleets_getFleetMembers.html +2 -0
- package/docs/modules/src_api_fleets_getFleetWings.html +2 -0
- package/docs/modules/src_api_fleets_postFleetInvitation.html +2 -0
- package/docs/modules/src_api_fleets_postFleetSquad.html +2 -0
- package/docs/modules/src_api_fleets_postFleetWing.html +2 -0
- package/docs/modules/src_api_fleets_putFleetMember.html +2 -0
- package/docs/modules/src_api_fleets_putFleetSquad.html +2 -0
- package/docs/modules/src_api_fleets_putFleetWing.html +2 -0
- package/docs/modules/src_api_fleets_updateFleet.html +2 -0
- package/docs/modules/src_api_incursions_getIncursions.html +2 -0
- package/docs/modules/src_api_industry_getCharacterIndustryJobs.html +2 -0
- package/docs/modules/src_api_industry_getCharacterMiningLedger.html +2 -0
- package/docs/modules/src_api_industry_getCorporationIndustryJobs.html +2 -0
- package/docs/modules/src_api_industry_getCorporationMiningObserver.html +2 -0
- package/docs/modules/src_api_industry_getCorporationMiningObservers.html +2 -0
- package/docs/modules/src_api_industry_getIndustryFacilities.html +2 -0
- package/docs/modules/src_api_industry_getIndustrySystems.html +2 -0
- package/docs/modules/src_api_industry_getMoonExtractionTimers.html +2 -0
- package/docs/modules/src_api_insurance_getInsurancePrices.html +2 -0
- package/docs/modules/src_api_killmails_getCharacterRecentKillmails.html +2 -0
- package/docs/modules/src_api_killmails_getCorporationRecentKillmails.html +2 -0
- package/docs/modules/src_api_killmails_getKillmail.html +2 -0
- package/docs/modules/src_api_location_getCharacterLocation.html +2 -0
- package/docs/modules/src_api_location_getCharacterOnline.html +2 -0
- package/docs/modules/src_api_location_getCharacterShip.html +2 -0
- package/docs/modules/src_api_loyalty_getLoyaltyPoints.html +2 -0
- package/docs/modules/src_api_loyalty_getLoyaltyStoreOffers.html +2 -0
- package/docs/modules/src_api_mail_deleteCharacterMail.html +2 -0
- package/docs/modules/src_api_mail_deleteCharacterMailLabel.html +2 -0
- package/docs/modules/src_api_mail_getCharacterMail.html +2 -0
- package/docs/modules/src_api_mail_getCharacterMailHeaders.html +2 -0
- package/docs/modules/src_api_mail_getCharacterMailLabels.html +2 -0
- package/docs/modules/src_api_mail_getCharacterMailingLists.html +2 -0
- package/docs/modules/src_api_mail_postCharacterMail.html +2 -0
- package/docs/modules/src_api_mail_postCharacterMailLabels.html +2 -0
- package/docs/modules/src_api_mail_putCharacterMail.html +2 -0
- package/docs/modules/src_api_market_getCharacterOrderHistory.html +2 -0
- package/docs/modules/src_api_market_getCharacterOrders.html +2 -0
- package/docs/modules/src_api_market_getCorporationOrderHistory.html +2 -0
- package/docs/modules/src_api_market_getCorporationOrders.html +2 -0
- package/docs/modules/src_api_market_getMarketGroupInformation.html +2 -0
- package/docs/modules/src_api_market_getMarketGroups.html +2 -0
- package/docs/modules/src_api_market_getMarketHistory.html +2 -0
- package/docs/modules/src_api_market_getMarketOrders.html +2 -0
- package/docs/modules/src_api_market_getMarketOrdersInStructure.html +2 -0
- package/docs/modules/src_api_market_getMarketPrices.html +2 -0
- package/docs/modules/src_api_market_getMarketTypes.html +2 -0
- package/docs/modules/src_api_meta_getSwaggerJson.html +2 -0
- package/docs/modules/src_api_meta_getSwaggerYaml.html +2 -0
- package/docs/modules/src_api_opportunities_getCharacterOpportunities.html +2 -0
- package/docs/modules/src_api_opportunities_getOpportunitiesGroupById.html +2 -0
- package/docs/modules/src_api_opportunities_getOpportunitiesGroups.html +2 -0
- package/docs/modules/src_api_opportunities_getOpportunitiesTaskById.html +2 -0
- package/docs/modules/src_api_opportunities_getOpportunitiesTasks.html +2 -0
- package/docs/modules/src_api_pi_getColonies.html +2 -0
- package/docs/modules/src_api_pi_getColonyLayout.html +2 -0
- package/docs/modules/src_api_pi_getCorporationCustomsOffices.html +2 -0
- package/docs/modules/src_api_pi_getSchematicInformation.html +2 -0
- package/docs/modules/src_api_route_getRoute.html +2 -0
- package/docs/modules/src_api_search_getCharacterSearch.html +2 -0
- package/docs/modules/src_api_skills_getCharacterAttributes.html +2 -0
- package/docs/modules/src_api_skills_getCharacterSkillQueue.html +2 -0
- package/docs/modules/src_api_skills_getCharacterSkills.html +2 -0
- package/docs/modules/src_api_sovereignty_getSovereigntyCampaigns.html +2 -0
- package/docs/modules/src_api_sovereignty_getSovereigntyMap.html +2 -0
- package/docs/modules/src_api_sovereignty_getSovereigntyStructures.html +2 -0
- package/docs/modules/src_api_status_getStatus.html +2 -0
- package/docs/modules/src_api_ui_postAutopilotWaypoint.html +2 -0
- package/docs/modules/src_api_ui_postOpenContractWindow.html +2 -0
- package/docs/modules/src_api_ui_postOpenInformationWindow.html +2 -0
- package/docs/modules/src_api_ui_postOpenMarketDetailsWindow.html +2 -0
- package/docs/modules/src_api_ui_postOpenNewMailWindow.html +2 -0
- package/docs/modules/src_api_universe_getAncestries.html +2 -0
- package/docs/modules/src_api_universe_getAsteroidBeltInfo.html +2 -0
- package/docs/modules/src_api_universe_getBloodlines.html +2 -0
- package/docs/modules/src_api_universe_getConstellationById.html +2 -0
- package/docs/modules/src_api_universe_getConstellations.html +2 -0
- package/docs/modules/src_api_universe_getFactions.html +2 -0
- package/docs/modules/src_api_universe_getGraphicById.html +2 -0
- package/docs/modules/src_api_universe_getGraphics.html +2 -0
- package/docs/modules/src_api_universe_getItemCategories.html +2 -0
- package/docs/modules/src_api_universe_getItemCategoryById.html +2 -0
- package/docs/modules/src_api_universe_getItemGroupById.html +2 -0
- package/docs/modules/src_api_universe_getItemGroups.html +2 -0
- package/docs/modules/src_api_universe_getMoonById.html +2 -0
- package/docs/modules/src_api_universe_getPlanetById.html +2 -0
- package/docs/modules/src_api_universe_getRaces.html +2 -0
- package/docs/modules/src_api_universe_getRegionById.html +2 -0
- package/docs/modules/src_api_universe_getStarById.html +2 -0
- package/docs/modules/src_api_universe_getStargateById.html +2 -0
- package/docs/modules/src_api_universe_getStationById.html +2 -0
- package/docs/modules/src_api_universe_getStructureById.html +2 -0
- package/docs/modules/src_api_universe_getStructures.html +2 -0
- package/docs/modules/src_api_universe_getSystemById.html +2 -0
- package/docs/modules/src_api_universe_getSystemJumps.html +2 -0
- package/docs/modules/src_api_universe_getSystemKills.html +2 -0
- package/docs/modules/src_api_universe_getSystems.html +2 -0
- package/docs/modules/src_api_universe_getTypeById.html +2 -0
- package/docs/modules/src_api_universe_getTypes.html +2 -0
- package/docs/modules/src_api_universe_postBulkNamesToIds.html +2 -0
- package/docs/modules/src_api_universe_postNamesAndCategories.html +2 -0
- package/docs/modules/src_api_wallet_getCharacterWallet.html +2 -0
- package/docs/modules/src_api_wallet_getCharacterWalletJournal.html +2 -0
- package/docs/modules/src_api_wallet_getCharacterWalletTransactions.html +2 -0
- package/docs/modules/src_api_wallet_getCorporationWalletJournal.html +2 -0
- package/docs/modules/src_api_wallet_getCorporationWalletTransactions.html +2 -0
- package/docs/modules/src_api_wallet_getCorporationWallets.html +2 -0
- package/docs/modules/src_api_wars_getWarById.html +2 -0
- package/docs/modules/src_api_wars_getWarKillmails.html +2 -0
- package/docs/modules/src_api_wars_getWars.html +2 -0
- package/docs/modules/src_builders_AllianceApiBuilder.html +2 -0
- package/docs/modules/src_builders_AssetsApiBuilder.html +2 -0
- package/docs/modules/src_builders_BookmarkApiBuilder.html +2 -0
- package/docs/modules/src_builders_CalendarApiBuilder.html +2 -0
- package/docs/modules/src_builders_CharacterApiBuilder.html +2 -0
- package/docs/modules/src_builders_ClonesApiBuilder.html +2 -0
- package/docs/modules/src_builders_ContactsApiBuilder.html +2 -0
- package/docs/modules/src_builders_ContractsApiBuilder.html +2 -0
- package/docs/modules/src_builders_CorporationsApiBuilder.html +2 -0
- package/docs/modules/src_builders_DogmaApiBuilder.html +2 -0
- package/docs/modules/src_builders_FactionApiBuilder.html +2 -0
- package/docs/modules/src_builders_FittingsApiBuilder.html +2 -0
- package/docs/modules/src_builders_FleetApiBuilder.html +2 -0
- package/docs/modules/src_builders_IncursionsApiBuilder.html +2 -0
- package/docs/modules/src_builders_IndustryApiBuilder.html +2 -0
- package/docs/modules/src_builders_InsuranceApiBuilder.html +2 -0
- package/docs/modules/src_builders_KillmailsBuilder.html +2 -0
- package/docs/modules/src_builders_LocationApiBuilder.html +2 -0
- package/docs/modules/src_builders_LoyaltyApiBuilder.html +2 -0
- package/docs/modules/src_builders_MailApiBuilder.html +2 -0
- package/docs/modules/src_builders_MarketApiBuilder.html +2 -0
- package/docs/modules/src_builders_MetaApiBuilder.html +2 -0
- package/docs/modules/src_builders_OpportunitiesApiBuilder.html +2 -0
- package/docs/modules/src_builders_PiApiBuilder.html +2 -0
- package/docs/modules/src_builders_RouteApiBuilder.html +2 -0
- package/docs/modules/src_builders_SearchApiBuilder.html +2 -0
- package/docs/modules/src_builders_SkillsApiBuilder.html +2 -0
- package/docs/modules/src_builders_SovereigntyApiBuilder.html +2 -0
- package/docs/modules/src_builders_StatusApiBuilder.html +2 -0
- package/docs/modules/src_builders_UiApiBuilder.html +2 -0
- package/docs/modules/src_builders_UniverseApiBuilder.html +2 -0
- package/docs/modules/src_builders_WalletApiBuilder.html +2 -0
- package/docs/modules/src_builders_WarsAPIBuilder.html +2 -0
- package/docs/modules/src_clients_AllianceClient.html +2 -0
- package/docs/modules/src_clients_AssetsClient.html +2 -0
- package/docs/modules/src_clients_BookmarkClient.html +2 -0
- package/docs/modules/src_clients_CalendarClient.html +2 -0
- package/docs/modules/src_clients_CharacterClient.html +2 -0
- package/docs/modules/src_clients_ClonesClient.html +2 -0
- package/docs/modules/src_clients_ContactsClient.html +2 -0
- package/docs/modules/src_clients_ContractsClient.html +2 -0
- package/docs/modules/src_clients_CorporationsClient.html +2 -0
- package/docs/modules/src_clients_DogmaClient.html +2 -0
- package/docs/modules/src_clients_FactionClient.html +2 -0
- package/docs/modules/src_clients_FittingsClient.html +2 -0
- package/docs/modules/src_clients_FleetClient.html +2 -0
- package/docs/modules/src_clients_IncursionsClient.html +2 -0
- package/docs/modules/src_clients_IndustryClient.html +2 -0
- package/docs/modules/src_clients_InsuranceClient.html +2 -0
- package/docs/modules/src_clients_KillmailsClient.html +2 -0
- package/docs/modules/src_clients_LocationClient.html +2 -0
- package/docs/modules/src_clients_LoyaltyClient.html +2 -0
- package/docs/modules/src_clients_MailClient.html +2 -0
- package/docs/modules/src_clients_MarketClient.html +2 -0
- package/docs/modules/src_clients_MetaClient.html +2 -0
- package/docs/modules/src_clients_OpportunitiesClient.html +2 -0
- package/docs/modules/src_clients_PiClient.html +2 -0
- package/docs/modules/src_clients_RouteClient.html +2 -0
- package/docs/modules/src_clients_SearchClient.html +2 -0
- package/docs/modules/src_clients_SkillsClient.html +2 -0
- package/docs/modules/src_clients_SovereigntyClient.html +2 -0
- package/docs/modules/src_clients_StatusClient.html +2 -0
- package/docs/modules/src_clients_UiClient.html +2 -0
- package/docs/modules/src_clients_UniverseClient.html +2 -0
- package/docs/modules/src_clients_WalletClient.html +2 -0
- package/docs/modules/src_clients_WarsClient.html +2 -0
- package/docs/modules/src_config_configManager.html +2 -0
- package/docs/modules/src_config_constants.html +5 -0
- package/docs/modules/src_config_jest_jest_setup.html +2 -0
- package/docs/modules/src_core_ApiClient.html +2 -0
- package/docs/modules/src_core_ApiClientBuilder.html +2 -0
- package/docs/modules/src_core_ApiError.html +2 -0
- package/docs/modules/src_core_ApiRequestHandler.html +6 -0
- package/docs/modules/src_core_IAPIBuilder.html +4 -0
- package/docs/modules/src_core_cache_ETagCacheManager.html +4 -0
- package/docs/modules/src_core_container_Container.html +9 -0
- package/docs/modules/src_core_errors_ApiError.html +4 -0
- package/docs/modules/src_core_factory_ApiFactory.html +6 -0
- package/docs/modules/src_core_logger.html +2 -0
- package/docs/modules/src_core_logger_logger.html +2 -0
- package/docs/modules/src_core_logger_loggerUtil.html +5 -0
- package/docs/modules/src_core_util_error.html +2 -0
- package/docs/modules/src_core_util_file.html +4 -0
- package/docs/modules/src_core_util_headersUtil.html +2 -0
- package/docs/modules/src_core_util_inputValidation.html +2 -0
- package/docs/modules/src_core_util_network.html +2 -0
- package/docs/modules/src_core_util_request.html +3 -0
- package/docs/modules/src_core_util_testHelpers.html +4 -0
- package/docs/modules/src_testing_TestDataFactory.html +3 -0
- package/docs/modules/src_testing_TestHelpers.html +9 -0
- package/docs/modules/src_types_api_responses.html +28 -0
- package/docs/modules/src_types_winston_loggly_bulk.html +3 -0
- package/docs/modules.html +305 -0
- package/docs/types/src_EsiClientBuilder.ApiClientType.html +1 -0
- package/docs/types/src_EsiClientBuilder.ClientInstance.html +1 -0
- package/docs/types/src_core_container_Container.AsyncFactory.html +1 -0
- package/docs/types/src_core_container_Container.Factory.html +1 -0
- package/docs/variables/src_EsiClient.esiClient-1.html +1 -0
- package/docs/variables/src_config_constants.localConfig.html +1 -0
- package/docs/variables/src_config_constants.projectConfig.html +1 -0
- package/docs/variables/src_config_constants.routes.html +1 -0
- package/docs/variables/src_config_constants.server.html +1 -0
- package/docs/variables/src_core_container_Container.container-1.html +1 -0
- package/docs/variables/src_core_factory_ApiFactory.apiFactory-1.html +1 -0
- package/docs/variables/src_core_logger_logger.default.html +1 -0
- package/jest.improved.config.cjs +46 -0
- package/jest.unit.config.cjs +4 -1
- package/output.txt +0 -0
- package/package.json +34 -13
- package/src/EsiClient.ts +351 -0
- package/src/EsiClientBuilder.ts +380 -0
- package/src/TODO +26 -21
- package/src/api/alliances/getAllianceById.ts +7 -1
- package/src/api/alliances/getAlliances.ts +2 -2
- package/src/api/characters/postCharacterAffiliations.ts +2 -1
- package/src/api/clones/postJumpCloneActivation.ts +11 -0
- package/src/api/corporations/getCorporationProjects.ts +10 -0
- package/src/api/meta/getSwaggerJson.ts +10 -0
- package/src/api/meta/getSwaggerYaml.ts +36 -0
- package/src/api/status/getStatus.ts +2 -2
- package/src/builders/AllianceApiBuilder.ts +3 -2
- package/src/builders/AssetsApiBuilder.ts +2 -1
- package/src/builders/BookmarkApiBuilder.ts +2 -1
- package/src/builders/CalendarApiBuilder.ts +2 -1
- package/src/builders/CharacterApiBuilder.ts +2 -1
- package/src/builders/ClonesApiBuilder.ts +2 -1
- package/src/builders/ContactsApiBuilder.ts +2 -1
- package/src/builders/ContractsApiBuilder.ts +2 -1
- package/src/builders/CorporationsApiBuilder.ts +2 -1
- package/src/builders/DogmaApiBuilder.ts +2 -1
- package/src/builders/FactionApiBuilder.ts +3 -2
- package/src/builders/FittingsApiBuilder.ts +2 -3
- package/src/builders/FleetApiBuilder.ts +2 -1
- package/src/builders/IncursionsApiBuilder.ts +2 -1
- package/src/builders/IndustryApiBuilder.ts +2 -1
- package/src/builders/InsuranceApiBuilder.ts +2 -1
- package/src/builders/KillmailsBuilder.ts +2 -1
- package/src/builders/LocationApiBuilder.ts +2 -1
- package/src/builders/LoyaltyApiBuilder.ts +2 -1
- package/src/builders/MailApiBuilder.ts +2 -1
- package/src/builders/MarketApiBuilder.ts +2 -1
- package/src/builders/MetaApiBuilder.ts +15 -0
- package/src/builders/OpportunitiesApiBuilder.ts +2 -1
- package/src/builders/PiApiBuilder.ts +2 -1
- package/src/builders/RouteApiBuilder.ts +2 -1
- package/src/builders/SearchApiBuilder.ts +2 -1
- package/src/builders/SkillsApiBuilder.ts +2 -1
- package/src/builders/SovereigntyApiBuilder.ts +2 -1
- package/src/builders/StatusApiBuilder.ts +2 -1
- package/src/builders/UiApiBuilder.ts +2 -1
- package/src/builders/UniverseApiBuilder.ts +2 -1
- package/src/builders/WalletApiBuilder.ts +2 -1
- package/src/builders/WarsAPIBuilder.ts +2 -1
- package/src/clients/AllianceClient.ts +23 -14
- package/src/clients/ClonesClient.ts +7 -0
- package/src/clients/CorporationsClient.ts +7 -0
- package/src/clients/MetaClient.ts +24 -0
- package/src/core/ApiRequestHandler.ts +77 -3
- package/src/core/IAPIBuilder.ts +13 -0
- package/src/core/cache/ETagCacheManager.ts +248 -0
- package/src/core/container/Container.ts +176 -0
- package/src/core/errors/ApiError.ts +153 -0
- package/src/core/factory/ApiFactory.ts +207 -0
- package/src/core/util/headersUtil.ts +12 -0
- package/src/index.ts +214 -1152
- package/src/testing/TestDataFactory.ts +742 -0
- package/src/testing/TestHelpers.ts +280 -0
- package/src/types/api-responses.ts +291 -0
- package/tests/bdd/simple-bdd-demo.test.ts +210 -0
- package/tests/bdd-scenarios/core/bdd-alliance.test.ts +210 -0
- package/tests/bdd-scenarios/core/bdd-character.test.ts +346 -0
- package/tests/bdd-scenarios/core/bdd-clones.test.ts +159 -0
- package/tests/bdd-scenarios/core/bdd-corporation-projects.test.ts +136 -0
- package/tests/bdd-scenarios/core/bdd-corporation.test.ts +388 -0
- package/tests/bdd-scenarios/core/bdd-etag-caching.test.ts +280 -0
- package/tests/bdd-scenarios/core/bdd-market.test.ts +435 -0
- package/tests/bdd-scenarios/core/bdd-meta.test.ts +131 -0
- package/tests/bdd-scenarios/core/bdd-universe.test.ts +463 -0
- package/tests/bdd-scenarios/integration/bdd-integration-workflows.test.ts +490 -0
- package/tests/bdd-scenarios/performance/bdd-performance.test.ts +463 -0
- package/tests/tdd/alliances/AllianceClient.improved.test.ts +266 -0
- package/tests/tdd/alliances/AllianceClient.test.ts +186 -15
- package/tests/tdd/alliances/getAlliances.test.ts +4 -7
- package/tests/tdd/clones/postJumpCloneActivation.test.ts +70 -0
- package/tests/tdd/contacts/ContactsClient.test.ts +267 -44
- package/tests/tdd/core/ETagCacheManager.test.ts +173 -0
- package/tests/tdd/core/ETagIntegration.test.ts +208 -0
- package/tests/tdd/corporations/CorporationsClient.test.ts +180 -9
- package/tests/tdd/corporations/getCorporationProjects.test.ts +62 -0
- package/tests/tdd/incursions/getIncursions.test.ts +148 -23
- package/tests/tdd/meta/MetaApiBuilder.test.ts +45 -0
- package/tests/tdd/meta/MetaClient.test.ts +92 -0
- package/tests/tdd/meta/getSwaggerJson.test.ts +40 -0
- package/tests/tdd/meta/getSwaggerYaml.test.ts +40 -0
- package/tests/tdd/status/StatusClient.test.ts +10 -8
- package/tests/tdd/status/getStatus.test.ts +12 -10
- package/typedoc.json +77 -0
- package/Structure.js +0 -257
- package/eslint.json +0 -13
- package/jest.bdd.config.cjs +0 -22
- package/src/config/jest/jest.bdd.setup.ts +0 -11
- package/tests/bdd/features/alliances/getAllianceById.feature +0 -6
- package/tests/bdd/features/alliances/getAllianceContactLabels.feature +0 -0
- package/tests/bdd/features/alliances/getAllianceContacts.feature +0 -0
- package/tests/bdd/features/alliances/getAllianceCorporations.feature +0 -6
- package/tests/bdd/features/alliances/getAllianceIcons.feature +0 -6
- package/tests/bdd/features/alliances/getAlliances.feature +0 -0
- package/tests/bdd/features/characters/getCharacter.feature +0 -0
- package/tests/bdd/features/characters/getCharacterAffiliation.feature +0 -0
- package/tests/bdd/features/characters/getCharacterAgentsResearch.feature +0 -0
- package/tests/bdd/features/characters/getCharacterAssetLocations.feature +0 -0
- package/tests/bdd/features/characters/getCharacterAssetNames.feature +0 -0
- package/tests/bdd/features/characters/getCharacterAssets.feature +0 -0
- package/tests/bdd/features/characters/getCharacterAttributes.feature +0 -0
- package/tests/bdd/features/characters/getCharacterBlueprints.feature +0 -0
- package/tests/bdd/features/characters/getCharacterBookmarkFolders.feature +0 -0
- package/tests/bdd/features/characters/getCharacterBookmarks.feature +0 -0
- package/tests/bdd/features/characters/getCharacterCalendarEventById.feature +0 -0
- package/tests/bdd/features/characters/getCharacterCalendarEvents.feature +0 -0
- package/tests/bdd/features/characters/getCharacterClones.feature +0 -0
- package/tests/bdd/features/characters/getCharacterContractBids.feature +0 -0
- package/tests/bdd/features/characters/getCharacterContractItems.feature +0 -0
- package/tests/bdd/features/characters/getCharacterContracts.feature +0 -0
- package/tests/bdd/features/characters/getCharacterCorporationHistory.feature +0 -0
- package/tests/bdd/features/characters/getCharacterFatigue.feature +0 -0
- package/tests/bdd/features/characters/getCharacterFittings.feature +0 -0
- package/tests/bdd/features/characters/getCharacterFleet.feature +0 -0
- package/tests/bdd/features/characters/getCharacterFwStats.feature +0 -0
- package/tests/bdd/features/characters/getCharacterImplants.feature +0 -0
- package/tests/bdd/features/characters/getCharacterIndustryJobs.feature +0 -0
- package/tests/bdd/features/characters/getCharacterKillmails.feature +0 -0
- package/tests/bdd/features/characters/getCharacterLocation.feature +0 -0
- package/tests/bdd/features/characters/getCharacterLoyaltyPoints.feature +0 -0
- package/tests/bdd/features/characters/getCharacterMail.feature +0 -0
- package/tests/bdd/features/characters/getCharacterMailById.feature +0 -0
- package/tests/bdd/features/characters/getCharacterMailLabels.feature +0 -0
- package/tests/bdd/features/characters/getCharacterMailLists.feature +0 -0
- package/tests/bdd/features/characters/getCharacterMedals.feature +0 -0
- package/tests/bdd/features/characters/getCharacterMining.feature +0 -0
- package/tests/bdd/features/characters/getCharacterNotifications.feature +0 -0
- package/tests/bdd/features/characters/getCharacterNotificationsContacts.feature +0 -0
- package/tests/bdd/features/characters/getCharacterOpportunities.feature +0 -0
- package/tests/bdd/features/characters/getCharacterOrderHistory.feature +0 -0
- package/tests/bdd/features/characters/getCharacterOrders.feature +0 -0
- package/tests/bdd/features/characters/getCharacterPlanets.feature +0 -0
- package/tests/bdd/features/characters/getCharacterPortrait.feature +0 -0
- package/tests/bdd/features/characters/getCharacterRoles.feature +0 -0
- package/tests/bdd/features/characters/getCharacterSearch.feature +0 -0
- package/tests/bdd/features/characters/getCharacterShip.feature +0 -0
- package/tests/bdd/features/characters/getCharacterSkillQueue.feature +0 -0
- package/tests/bdd/features/characters/getCharacterSkills.feature +0 -0
- package/tests/bdd/features/characters/getCharacterStandings.feature +0 -0
- package/tests/bdd/features/characters/getCharacterStats.feature +0 -0
- package/tests/bdd/features/characters/getCharacterTitles.feature +0 -0
- package/tests/bdd/features/characters/getCharacterWallet.feature +0 -0
- package/tests/bdd/features/characters/getCharacterWalletJournal.feature +0 -0
- package/tests/bdd/features/characters/getCharacterWalletTransactions.feature +0 -0
- package/tests/bdd/features/contracts/getContractBids.feature +0 -0
- package/tests/bdd/features/contracts/getContractById.feature +0 -0
- package/tests/bdd/features/contracts/getContractItems.feature +0 -0
- package/tests/bdd/features/contracts/getContracts.feature +0 -0
- package/tests/bdd/features/contracts/getPublicContractBids.feature +0 -0
- package/tests/bdd/features/contracts/getPublicContractItems.feature +0 -0
- package/tests/bdd/features/contracts/getPublicContracts.feature +0 -0
- package/tests/bdd/features/corporations/getCorporation.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationAlliances.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationBlueprints.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationBookmarkFolders.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationBookmarks.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationContactLabels.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationContacts.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationContainerLogs.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationContractBids.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationContractItems.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationContracts.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationDivisions.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationFacilities.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationFwStats.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationIcons.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationIndustryJobs.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationKillmails.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationMedals.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationMemberLimit.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationMemberTracking.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationMembers.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationMining.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationNotifications.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationOrderHistory.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationOrders.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationOutposts.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationRoles.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationShareholders.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationStandings.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationStarbases.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationStructures.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationTitles.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationWalletJournal.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationWalletTransactions.feature +0 -0
- package/tests/bdd/features/corporations/getCorporationWallets.feature +0 -0
- package/tests/bdd/features/dogma/getDogmaAttributeById.feature +0 -0
- package/tests/bdd/features/dogma/getDogmaAttributes.feature +0 -0
- package/tests/bdd/features/dogma/getDogmaDynamicItemAttributes.feature +0 -0
- package/tests/bdd/features/dogma/getDogmaEffectById.feature +0 -0
- package/tests/bdd/features/dogma/getDogmaEffects.feature +0 -0
- package/tests/bdd/features/factions/getFactionWarfareLeaderboards.feature +0 -6
- package/tests/bdd/features/factions/getFactionWarfareStats.feature +0 -6
- package/tests/bdd/features/factions/getFactionWarfareSystems.feature +0 -6
- package/tests/bdd/features/factions/getFactionWarfareWars.feature +0 -6
- package/tests/bdd/features/fleets/getFleetMembers.feature +0 -0
- package/tests/bdd/features/fleets/getFleetSquads.feature +0 -0
- package/tests/bdd/features/fleets/getFleetWings.feature +0 -0
- package/tests/bdd/features/fleets/getFleets.feature +0 -0
- package/tests/bdd/features/incursions/getIncursions.feature +0 -0
- package/tests/bdd/features/industry/getIndustryCorporationJobs.feature +0 -0
- package/tests/bdd/features/industry/getIndustryFacilities.feature +0 -0
- package/tests/bdd/features/industry/getIndustryJobs.feature +0 -0
- package/tests/bdd/features/industry/getIndustrySystems.feature +0 -0
- package/tests/bdd/features/insurance/getInsurancePrices.feature +0 -0
- package/tests/bdd/features/killmails/getKillmailById.feature +0 -0
- package/tests/bdd/features/killmails/getKillmails.feature +0 -0
- package/tests/bdd/features/killmails/getRecentCharacterKillmails.feature +0 -0
- package/tests/bdd/features/killmails/getRecentCorporationKillmails.feature +0 -0
- package/tests/bdd/features/location/getLocation.feature +0 -0
- package/tests/bdd/features/markets/getMarketGroupById.feature +0 -0
- package/tests/bdd/features/markets/getMarketGroups.feature +0 -0
- package/tests/bdd/features/markets/getMarketHistory.feature +0 -0
- package/tests/bdd/features/markets/getMarketOrders.feature +0 -0
- package/tests/bdd/features/markets/getMarketPrices.feature +0 -0
- package/tests/bdd/features/markets/getMarketRegionHistory.feature +0 -0
- package/tests/bdd/features/markets/getMarketRegionOrders.feature +0 -0
- package/tests/bdd/features/opportunities/getOpportunitiesGroups.feature +0 -0
- package/tests/bdd/features/opportunities/getOpportunitiesTasks.feature +0 -0
- package/tests/bdd/features/search/postSearch.feature +0 -0
- package/tests/bdd/features/sovereignty/getSovereigntyCampaigns.feature +0 -0
- package/tests/bdd/features/sovereignty/getSovereigntyMap.feature +0 -0
- package/tests/bdd/features/sovereignty/getSovereigntyStructures.feature +0 -0
- package/tests/bdd/features/ui/postUiAutopilotWaypoint.feature +0 -0
- package/tests/bdd/features/ui/postUiOpenWindowContract.feature +0 -0
- package/tests/bdd/features/ui/postUiOpenWindowInformation.feature +0 -0
- package/tests/bdd/features/ui/postUiOpenWindowMarketDetails.feature +0 -0
- package/tests/bdd/features/ui/postUiOpenWindowNewMail.feature +0 -0
- package/tests/bdd/features/universe/getAncestries.feature +0 -0
- package/tests/bdd/features/universe/getAsteroidBelt.feature +0 -0
- package/tests/bdd/features/universe/getBloodlines.feature +0 -0
- package/tests/bdd/features/universe/getCategories.feature +0 -0
- package/tests/bdd/features/universe/getCategoryById.feature +0 -0
- package/tests/bdd/features/universe/getConstellationById.feature +0 -0
- package/tests/bdd/features/universe/getConstellations.feature +0 -0
- package/tests/bdd/features/universe/getFactions.feature +0 -0
- package/tests/bdd/features/universe/getGraphicById.feature +0 -0
- package/tests/bdd/features/universe/getGraphics.feature +0 -0
- package/tests/bdd/features/universe/getGroupById.feature +0 -0
- package/tests/bdd/features/universe/getGroups.feature +0 -0
- package/tests/bdd/features/universe/getMoonById.feature +0 -0
- package/tests/bdd/features/universe/getMoons.feature +0 -0
- package/tests/bdd/features/universe/getPlanetById.feature +0 -0
- package/tests/bdd/features/universe/getPlanets.feature +0 -0
- package/tests/bdd/features/universe/getRaces.feature +0 -0
- package/tests/bdd/features/universe/getRegionById.feature +0 -0
- package/tests/bdd/features/universe/getRegions.feature +0 -0
- package/tests/bdd/features/universe/getStarById.feature +0 -0
- package/tests/bdd/features/universe/getStargateById.feature +0 -0
- package/tests/bdd/features/universe/getStargates.feature +0 -0
- package/tests/bdd/features/universe/getStars.feature +0 -0
- package/tests/bdd/features/universe/getStationById.feature +0 -0
- package/tests/bdd/features/universe/getStations.feature +0 -0
- package/tests/bdd/features/universe/getStructures.feature +0 -0
- package/tests/bdd/features/universe/getSystemById.feature +0 -0
- package/tests/bdd/features/universe/getSystemJumps.feature +0 -0
- package/tests/bdd/features/universe/getSystemKills.feature +0 -0
- package/tests/bdd/features/universe/getSystems.feature +0 -0
- package/tests/bdd/features/universe/getTypeById.feature +0 -0
- package/tests/bdd/features/universe/getTypes.feature +0 -0
- package/tests/bdd/features/universe/getWarById.feature +0 -0
- package/tests/bdd/features/universe/getWars.feature +0 -0
- package/tests/bdd/features/universe/postBulkIdsToNames.feature +0 -0
- package/tests/bdd/features/universe/postBulkNamesToIds.feature +0 -0
- package/tests/bdd/features/universe/postUniverseNames.feature +0 -0
- package/tests/bdd/features/wars/getWarById.feature +0 -0
- package/tests/bdd/features/wars/getWars.feature +0 -0
- package/tests/bdd/steps/alliances/getAllianceById.ts +0 -17
- package/tests/bdd/steps/alliances/getAllianceContactLabels.ts +0 -0
- package/tests/bdd/steps/alliances/getAllianceContacts.ts +0 -0
- package/tests/bdd/steps/alliances/getAllianceCorporations.ts +0 -18
- package/tests/bdd/steps/alliances/getAllianceIcons.ts +0 -21
- package/tests/bdd/steps/alliances/getAlliances.ts +0 -0
- package/tests/bdd/steps/characters/getCharacter.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterAffiliation.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterAgentsResearch.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterAssetLocations.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterAssetNames.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterAssets.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterAttributes.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterBlueprints.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterBookmarkFolders.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterBookmarks.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterCalendarEventById.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterCalendarEvents.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterClones.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterContractBids.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterContractItems.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterContracts.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterCorporationHistory.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterFatigue.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterFittings.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterFleet.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterFwStats.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterImplants.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterIndustryJobs.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterKillmails.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterLocation.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterLoyaltyPoints.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterMail.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterMailById.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterMailLabels.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterMailLists.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterMedals.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterMining.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterNotifications.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterNotificationsContacts.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterOpportunities.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterOrderHistory.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterOrders.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterPlanets.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterPortrait.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterRoles.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterSearch.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterShip.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterSkillQueue.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterSkills.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterStandings.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterStats.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterTitles.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterWallet.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterWalletJournal.ts +0 -0
- package/tests/bdd/steps/characters/getCharacterWalletTransactions.ts +0 -0
- package/tests/bdd/steps/contracts/getContractBids.ts +0 -0
- package/tests/bdd/steps/contracts/getContractById.ts +0 -0
- package/tests/bdd/steps/contracts/getContractItems.ts +0 -0
- package/tests/bdd/steps/contracts/getContracts.ts +0 -0
- package/tests/bdd/steps/contracts/getPublicContractBids.ts +0 -0
- package/tests/bdd/steps/contracts/getPublicContractItems.ts +0 -0
- package/tests/bdd/steps/contracts/getPublicContracts.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporation.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationAlliances.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationBlueprints.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationBookmarkFolders.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationBookmarks.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationContactLabels.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationContacts.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationContainerLogs.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationContractBids.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationContractItems.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationContracts.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationDivisions.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationFacilities.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationFwStats.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationIcons.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationIndustryJobs.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationKillmails.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationMedals.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationMemberLimit.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationMemberTracking.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationMembers.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationMining.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationNotifications.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationOrderHistory.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationOrders.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationOutposts.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationRoles.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationShareholders.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationStandings.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationStarbases.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationStructures.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationTitles.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationWalletJournal.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationWalletTransactions.ts +0 -0
- package/tests/bdd/steps/corporations/getCorporationWallets.ts +0 -0
- package/tests/bdd/steps/dogma/getDogmaAttributeById.ts +0 -0
- package/tests/bdd/steps/dogma/getDogmaAttributes.ts +0 -0
- package/tests/bdd/steps/dogma/getDogmaDynamicItemAttributes.ts +0 -0
- package/tests/bdd/steps/dogma/getDogmaEffectById.ts +0 -0
- package/tests/bdd/steps/dogma/getDogmaEffects.ts +0 -0
- package/tests/bdd/steps/factions/getFactionWarfareLeaderboards.ts +0 -33
- package/tests/bdd/steps/factions/getFactionWarfareStats.ts +0 -34
- package/tests/bdd/steps/factions/getFactionWarfareSystems.ts +0 -33
- package/tests/bdd/steps/factions/getFactionWarfareWars.ts +0 -33
- package/tests/bdd/steps/fleets/getFleetMembers.ts +0 -0
- package/tests/bdd/steps/fleets/getFleetSquads.ts +0 -0
- package/tests/bdd/steps/fleets/getFleetWings.ts +0 -0
- package/tests/bdd/steps/fleets/getFleets.ts +0 -0
- package/tests/bdd/steps/incursions/getIncursions.ts +0 -0
- package/tests/bdd/steps/industry/getIndustryCorporationJobs.ts +0 -0
- package/tests/bdd/steps/industry/getIndustryFacilities.ts +0 -0
- package/tests/bdd/steps/industry/getIndustryJobs.ts +0 -0
- package/tests/bdd/steps/industry/getIndustrySystems.ts +0 -0
- package/tests/bdd/steps/insurance/getInsurancePrices.ts +0 -0
- package/tests/bdd/steps/killmails/getKillmailById.ts +0 -0
- package/tests/bdd/steps/killmails/getKillmails.ts +0 -0
- package/tests/bdd/steps/killmails/getRecentCharacterKillmails.ts +0 -0
- package/tests/bdd/steps/killmails/getRecentCorporationKillmails.ts +0 -0
- package/tests/bdd/steps/location/getLocation.ts +0 -0
- package/tests/bdd/steps/markets/getMarketGroupById.ts +0 -0
- package/tests/bdd/steps/markets/getMarketGroups.ts +0 -0
- package/tests/bdd/steps/markets/getMarketHistory.ts +0 -0
- package/tests/bdd/steps/markets/getMarketOrders.ts +0 -0
- package/tests/bdd/steps/markets/getMarketPrices.ts +0 -0
- package/tests/bdd/steps/markets/getMarketRegionHistory.ts +0 -0
- package/tests/bdd/steps/markets/getMarketRegionOrders.ts +0 -0
- package/tests/bdd/steps/opportunities/getOpportunitiesGroups.ts +0 -0
- package/tests/bdd/steps/opportunities/getOpportunitiesTasks.ts +0 -0
- package/tests/bdd/steps/search/postSearch.ts +0 -0
- package/tests/bdd/steps/sovereignty/getSovereigntyCampaigns.ts +0 -0
- package/tests/bdd/steps/sovereignty/getSovereigntyMap.ts +0 -0
- package/tests/bdd/steps/sovereignty/getSovereigntyStructures.ts +0 -0
- package/tests/bdd/steps/ui/postUiAutopilotWaypoint.ts +0 -0
- package/tests/bdd/steps/ui/postUiOpenWindowContract.ts +0 -0
- package/tests/bdd/steps/ui/postUiOpenWindowInformation.ts +0 -0
- package/tests/bdd/steps/ui/postUiOpenWindowMarketDetails.ts +0 -0
- package/tests/bdd/steps/ui/postUiOpenWindowNewMail.ts +0 -0
- package/tests/bdd/steps/universe/getAncestries.ts +0 -0
- package/tests/bdd/steps/universe/getAsteroidBelt.ts +0 -0
- package/tests/bdd/steps/universe/getBloodlines.ts +0 -0
- package/tests/bdd/steps/universe/getCategories.ts +0 -0
- package/tests/bdd/steps/universe/getCategoryById.ts +0 -0
- package/tests/bdd/steps/universe/getConstellationById.ts +0 -0
- package/tests/bdd/steps/universe/getConstellations.ts +0 -0
- package/tests/bdd/steps/universe/getFactions.ts +0 -0
- package/tests/bdd/steps/universe/getGraphicById.ts +0 -0
- package/tests/bdd/steps/universe/getGraphics.ts +0 -0
- package/tests/bdd/steps/universe/getGroupById.ts +0 -0
- package/tests/bdd/steps/universe/getGroups.ts +0 -0
- package/tests/bdd/steps/universe/getMoonById.ts +0 -0
- package/tests/bdd/steps/universe/getMoons.ts +0 -0
- package/tests/bdd/steps/universe/getPlanetById.ts +0 -0
- package/tests/bdd/steps/universe/getPlanets.ts +0 -0
- package/tests/bdd/steps/universe/getRaces.ts +0 -0
- package/tests/bdd/steps/universe/getRegionById.ts +0 -0
- package/tests/bdd/steps/universe/getRegions.ts +0 -0
- package/tests/bdd/steps/universe/getStarById.ts +0 -0
- package/tests/bdd/steps/universe/getStargateById.ts +0 -0
- package/tests/bdd/steps/universe/getStargates.ts +0 -0
- package/tests/bdd/steps/universe/getStars.ts +0 -0
- package/tests/bdd/steps/universe/getStationById.ts +0 -0
- package/tests/bdd/steps/universe/getStations.ts +0 -0
- package/tests/bdd/steps/universe/getStructures.ts +0 -0
- package/tests/bdd/steps/universe/getSystemById.ts +0 -0
- package/tests/bdd/steps/universe/getSystemJumps.ts +0 -0
- package/tests/bdd/steps/universe/getSystemKills.ts +0 -0
- package/tests/bdd/steps/universe/getSystems.ts +0 -0
- package/tests/bdd/steps/universe/getTypeById.ts +0 -0
- package/tests/bdd/steps/universe/getTypes.ts +0 -0
- package/tests/bdd/steps/universe/getWarById.ts +0 -0
- package/tests/bdd/steps/universe/getWars.ts +0 -0
- package/tests/bdd/steps/universe/postBulkIdsToNames.ts +0 -0
- package/tests/bdd/steps/universe/postBulkNamesToIds.ts +0 -0
- package/tests/bdd/steps/universe/postUniverseNames.ts +0 -0
- package/tests/bdd/steps/wars/getWarById.ts +0 -0
- package/tests/bdd/steps/wars/getWars.ts +0 -0
package/docs/index.html
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@lgriffin/esi.ts - EVE Online ESI API Client - v1.0.0</title><meta name="description" content="Documentation for @lgriffin/esi.ts - EVE Online ESI API Client"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"><a href="https://github.com/lgriffin/ESI.ts">GitHub</a><a href="https://www.npmjs.com/package/@lgriffin/esi.ts">NPM</a></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="https://github.com/lgriffin/ESI.ts" class="title">@lgriffin/esi.ts - EVE Online ESI API Client - v1.0.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>@lgriffin/esi.ts - EVE Online ESI API Client - v1.0.0</h1></div><div class="tsd-panel tsd-typography"><a id="md:esits" class="tsd-anchor"></a><h1 class="tsd-anchor-link">ESI.ts<a href="#md:esits" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://badge.fury.io/js/%40lgriffin%2Fesi.ts" target="_blank" class="external"><img src="https://badge.fury.io/js/%40lgriffin%2Fesi.ts.svg" alt="npm version"></a>
|
|
2
|
+
<a href="https://www.gnu.org/licenses/gpl-3.0" target="_blank" class="external"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPL v3"></a>
|
|
3
|
+
<a href="https://www.typescriptlang.org/" target="_blank" class="external"><img src="https://img.shields.io/badge/TypeScript-4.5%2B-blue" alt="TypeScript"></a></p>
|
|
4
|
+
<p>A modern, type-safe TypeScript implementation for the <a href="https://esi.evetech.net/" target="_blank" class="external">EVE Online ESI API</a>. Built with clean architecture principles, comprehensive error handling, and extensive testing.</p>
|
|
5
|
+
<a id="md:๐-features" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ Features<a href="#md:๐-features" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
|
|
6
|
+
<li><strong>Type-Safe</strong>: Full TypeScript support with comprehensive type definitions</li>
|
|
7
|
+
<li><strong>Clean Architecture</strong>: Separation of concerns with dependency injection</li>
|
|
8
|
+
<li><strong>Resilient</strong>: Built-in error handling, retry logic, and circuit breakers</li>
|
|
9
|
+
<li><strong>High Performance</strong>: Intelligent ETag caching for optimal bandwidth usage</li>
|
|
10
|
+
<li><strong>Testable</strong>: Extensive test coverage with BDD scenarios</li>
|
|
11
|
+
<li><strong>Modern</strong>: Uses latest TypeScript features and best practices</li>
|
|
12
|
+
<li><strong>Comprehensive</strong>: Covers all ESI API endpoints with organized client structure</li>
|
|
13
|
+
</ul>
|
|
14
|
+
<a id="md:๐ฆ-installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ฆ Installation<a href="#md:๐ฆ-installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">@lgriffin/esi.ts</span>
|
|
15
|
+
</code><button type="button">Copy</button></pre>
|
|
16
|
+
|
|
17
|
+
<a id="md:๐ง-getting-started" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ง Getting Started<a href="#md:๐ง-getting-started" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>ESI.ts offers multiple ways to use the API depending on your needs:</p>
|
|
18
|
+
<a id="md:1-full-esi-client-all-apis" class="tsd-anchor"></a><h3 class="tsd-anchor-link">1. Full ESI Client (All APIs)<a href="#md:1-full-esi-client-all-apis" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>The complete <code>EsiClient</code> gives you access to all ESI endpoints:</p>
|
|
19
|
+
<pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Full client with all APIs available</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'your-app-name'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">accessToken:</span><span class="hl-1"> </span><span class="hl-2">'your-access-token'</span><span class="hl-1">, </span><span class="hl-5">// Optional - required for authenticated endpoints</span><br/><span class="hl-1"> </span><span class="hl-4">timeout:</span><span class="hl-1"> </span><span class="hl-8">30000</span><span class="hl-1">, </span><span class="hl-5">// Optional - request timeout in ms</span><br/><span class="hl-1"> </span><span class="hl-4">retryAttempts:</span><span class="hl-1"> </span><span class="hl-8">3</span><span class="hl-1"> </span><span class="hl-5">// Optional - number of retry attempts</span><br/><span class="hl-1">});</span>
|
|
20
|
+
</code><button type="button">Copy</button></pre>
|
|
21
|
+
|
|
22
|
+
<a id="md:2-custom-lightweight-client-selected-apis" class="tsd-anchor"></a><h3 class="tsd-anchor-link">2. Custom Lightweight Client (Selected APIs)<a href="#md:2-custom-lightweight-client-selected-apis" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Create a lightweight client with only the APIs you need:</p>
|
|
23
|
+
<pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">CustomEsiClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Lightweight client with only specific APIs</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">customClient</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">CustomEsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'my-trading-bot'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">clients:</span><span class="hl-1"> [</span><span class="hl-2">'characters'</span><span class="hl-1">, </span><span class="hl-2">'market'</span><span class="hl-1">, </span><span class="hl-2">'universe'</span><span class="hl-1">] </span><span class="hl-5">// Only load what you need</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Access your selected APIs</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">customClient</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">?.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">prices</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">customClient</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">?.</span><span class="hl-0">getMarketPrices</span><span class="hl-1">();</span>
|
|
24
|
+
</code><button type="button">Copy</button></pre>
|
|
25
|
+
|
|
26
|
+
<a id="md:3-builder-pattern-for-custom-clients" class="tsd-anchor"></a><h3 class="tsd-anchor-link">3. Builder Pattern for Custom Clients<a href="#md:3-builder-pattern-for-custom-clients" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Use the builder pattern for more readable client construction:</p>
|
|
27
|
+
<pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiClientBuilder</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Build a custom client step by step</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClientBuilder</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">addClient</span><span class="hl-1">(</span><span class="hl-2">'characters'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">addClient</span><span class="hl-1">(</span><span class="hl-2">'corporations'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">addClients</span><span class="hl-1">([</span><span class="hl-2">'market'</span><span class="hl-1">, </span><span class="hl-2">'universe'</span><span class="hl-1">])</span><br/><span class="hl-1"> .</span><span class="hl-0">withClientId</span><span class="hl-1">(</span><span class="hl-2">'my-corp-manager'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">withAccessToken</span><span class="hl-1">(</span><span class="hl-2">'your-token'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">build</span><span class="hl-1">();</span>
|
|
28
|
+
</code><button type="button">Copy</button></pre>
|
|
29
|
+
|
|
30
|
+
<a id="md:4-individual-api-clients-ultra-lightweight" class="tsd-anchor"></a><h3 class="tsd-anchor-link">4. Individual API Clients (Ultra Lightweight)<a href="#md:4-individual-api-clients-ultra-lightweight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Create standalone clients for single API groups:</p>
|
|
31
|
+
<pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiApiFactory</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Just the Character API</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">characterClient</span><span class="hl-1"> = </span><span class="hl-4">EsiApiFactory</span><span class="hl-1">.</span><span class="hl-0">createCharacterClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'character-lookup-tool'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Just the Market API</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">marketClient</span><span class="hl-1"> = </span><span class="hl-4">EsiApiFactory</span><span class="hl-1">.</span><span class="hl-0">createMarketClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'market-analyzer'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">prices</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">marketClient</span><span class="hl-1">.</span><span class="hl-0">getMarketPrices</span><span class="hl-1">();</span>
|
|
32
|
+
</code><button type="button">Copy</button></pre>
|
|
33
|
+
|
|
34
|
+
<a id="md:5-direct-api-class-instantiation" class="tsd-anchor"></a><h3 class="tsd-anchor-link">5. Direct API Class Instantiation<a href="#md:5-direct-api-class-instantiation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>For maximum control, instantiate API clients directly:</p>
|
|
35
|
+
<pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">CharacterClient</span><span class="hl-1">, </span><span class="hl-4">ApiClient</span><span class="hl-1">, </span><span class="hl-4">ApiClientBuilder</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Create the underlying API client</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">apiClient</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">ApiClientBuilder</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">withClientId</span><span class="hl-1">(</span><span class="hl-2">'direct-api-client'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">withBaseUrl</span><span class="hl-1">(</span><span class="hl-2">'https://esi.evetech.net'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">build</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Create the Character client directly</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">characterClient</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">CharacterClient</span><span class="hl-1">(</span><span class="hl-4">apiClient</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span>
|
|
36
|
+
</code><button type="button">Copy</button></pre>
|
|
37
|
+
|
|
38
|
+
<a id="md:๐-client-architecture" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ Client Architecture<a href="#md:๐-client-architecture" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:available-client-types" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Available Client Types<a href="#md:available-client-types" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>All approaches above give you access to these organized API clients:</p>
|
|
39
|
+
<pre><code class="typescript"><span class="hl-5">// Available clients:</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1"> </span><span class="hl-5">// Alliance information</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1"> </span><span class="hl-5">// Character data</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1"> </span><span class="hl-5">// Corporation management</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1"> </span><span class="hl-5">// Market data and trading</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">universe</span><span class="hl-1"> </span><span class="hl-5">// Universe information (systems, stations, items)</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">fleets</span><span class="hl-1"> </span><span class="hl-5">// Fleet management</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">industry</span><span class="hl-1"> </span><span class="hl-5">// Manufacturing and industry</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">mail</span><span class="hl-1"> </span><span class="hl-5">// In-game mail</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">contacts</span><span class="hl-1"> </span><span class="hl-5">// Contact management</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">assets</span><span class="hl-1"> </span><span class="hl-5">// Asset management</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1"> </span><span class="hl-5">// Wallet operations</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">killmails</span><span class="hl-1"> </span><span class="hl-5">// Killmail data</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">location</span><span class="hl-1"> </span><span class="hl-5">// Character location</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">skills</span><span class="hl-1"> </span><span class="hl-5">// Character skills (if available)</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">factions</span><span class="hl-1"> </span><span class="hl-5">// Faction warfare</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">wars</span><span class="hl-1"> </span><span class="hl-5">// War information</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">sovereignty</span><span class="hl-1"> </span><span class="hl-5">// Sovereignty data</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">incursions</span><span class="hl-1"> </span><span class="hl-5">// Incursion information</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">opportunities</span><span class="hl-1"> </span><span class="hl-5">// Opportunities system</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">fittings</span><span class="hl-1"> </span><span class="hl-5">// Ship fittings</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">clones</span><span class="hl-1"> </span><span class="hl-5">// Clone management</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">loyalty</span><span class="hl-1"> </span><span class="hl-5">// Loyalty points</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">bookmarks</span><span class="hl-1"> </span><span class="hl-5">// Bookmark management</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">calendar</span><span class="hl-1"> </span><span class="hl-5">// Calendar events</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">contracts</span><span class="hl-1"> </span><span class="hl-5">// Contract system</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">insurance</span><span class="hl-1"> </span><span class="hl-5">// Insurance information</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">route</span><span class="hl-1"> </span><span class="hl-5">// Route planning</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">search</span><span class="hl-1"> </span><span class="hl-5">// Search functionality</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">status</span><span class="hl-1"> </span><span class="hl-5">// Server status</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">ui</span><span class="hl-1"> </span><span class="hl-5">// UI interactions</span>
|
|
40
|
+
</code><button type="button">Copy</button></pre>
|
|
41
|
+
|
|
42
|
+
<a id="md:๐ฏ-choosing-the-right-approach" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ฏ Choosing the Right Approach<a href="#md:๐ฏ-choosing-the-right-approach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:when-to-use-each-method" class="tsd-anchor"></a><h3 class="tsd-anchor-link">When to Use Each Method<a href="#md:when-to-use-each-method" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><table>
|
|
43
|
+
<thead>
|
|
44
|
+
<tr>
|
|
45
|
+
<th>Approach</th>
|
|
46
|
+
<th>Best For</th>
|
|
47
|
+
<th>Memory Usage</th>
|
|
48
|
+
<th>Startup Time</th>
|
|
49
|
+
</tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
<tr>
|
|
53
|
+
<td><strong>Full EsiClient</strong></td>
|
|
54
|
+
<td>Complete applications, multiple API usage</td>
|
|
55
|
+
<td>High</td>
|
|
56
|
+
<td>Slower</td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td><strong>CustomEsiClient</strong></td>
|
|
60
|
+
<td>Focused applications, selected APIs</td>
|
|
61
|
+
<td>Medium</td>
|
|
62
|
+
<td>Medium</td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td><strong>EsiApiFactory</strong></td>
|
|
66
|
+
<td>Single-purpose tools, microservices</td>
|
|
67
|
+
<td>Low</td>
|
|
68
|
+
<td>Fast</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td><strong>Direct Instantiation</strong></td>
|
|
72
|
+
<td>Libraries, embedded usage</td>
|
|
73
|
+
<td>Minimal</td>
|
|
74
|
+
<td>Fastest</td>
|
|
75
|
+
</tr>
|
|
76
|
+
</tbody>
|
|
77
|
+
</table>
|
|
78
|
+
<a id="md:practical-examples-by-use-case" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Practical Examples by Use Case<a href="#md:practical-examples-by-use-case" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><a id="md:character-lookup-tool-ultra-lightweight" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Character Lookup Tool (Ultra Lightweight)<a href="#md:character-lookup-tool-ultra-lightweight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiApiFactory</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">characterClient</span><span class="hl-1"> = </span><span class="hl-4">EsiApiFactory</span><span class="hl-1">.</span><span class="hl-0">createCharacterClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'character-lookup-v1'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Just character operations</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">portrait</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPortrait</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`</span><span class="hl-6">${</span><span class="hl-4">character</span><span class="hl-9">.</span><span class="hl-4">body</span><span class="hl-9">.</span><span class="hl-4">name</span><span class="hl-6">}</span><span class="hl-2"> - </span><span class="hl-6">${</span><span class="hl-4">portrait</span><span class="hl-9">.</span><span class="hl-4">body</span><span class="hl-9">.</span><span class="hl-4">px128x128</span><span class="hl-6">}</span><span class="hl-2">`</span><span class="hl-1">);</span>
|
|
79
|
+
</code><button type="button">Copy</button></pre>
|
|
80
|
+
|
|
81
|
+
<a id="md:trading-bot-selected-apis" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Trading Bot (Selected APIs)<a href="#md:trading-bot-selected-apis" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiClientBuilder</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">tradingBot</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClientBuilder</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">addClients</span><span class="hl-1">([</span><span class="hl-2">'market'</span><span class="hl-1">, </span><span class="hl-2">'characters'</span><span class="hl-1">, </span><span class="hl-2">'universe'</span><span class="hl-1">, </span><span class="hl-2">'wallet'</span><span class="hl-1">])</span><br/><span class="hl-1"> .</span><span class="hl-0">withClientId</span><span class="hl-1">(</span><span class="hl-2">'trading-bot-v2'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">withAccessToken</span><span class="hl-1">(</span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-4">env</span><span class="hl-1">.</span><span class="hl-7">EVE_ACCESS_TOKEN</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">build</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Only the APIs you need are loaded</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">prices</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">tradingBot</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">?.</span><span class="hl-0">getMarketPrices</span><span class="hl-1">();</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">wallet</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">tradingBot</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">?.</span><span class="hl-0">getCharacterWallet</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">);</span>
|
|
82
|
+
</code><button type="button">Copy</button></pre>
|
|
83
|
+
|
|
84
|
+
<a id="md:corporation-management-dashboard-custom-client" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Corporation Management Dashboard (Custom Client)<a href="#md:corporation-management-dashboard-custom-client" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">CustomEsiClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">corpManager</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">CustomEsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'corp-dashboard'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">accessToken:</span><span class="hl-1"> </span><span class="hl-4">directorToken</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">clients:</span><span class="hl-1"> [</span><span class="hl-2">'corporations'</span><span class="hl-1">, </span><span class="hl-2">'characters'</span><span class="hl-1">, </span><span class="hl-2">'assets'</span><span class="hl-1">, </span><span class="hl-2">'wallet'</span><span class="hl-1">, </span><span class="hl-2">'mail'</span><span class="hl-1">]</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Efficient corp management with only needed APIs</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">corp</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">corpManager</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1">?.</span><span class="hl-0">getCorporationInfo</span><span class="hl-1">(</span><span class="hl-4">corpId</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">members</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">corpManager</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1">?.</span><span class="hl-0">getCorporationMembers</span><span class="hl-1">(</span><span class="hl-4">corpId</span><span class="hl-1">);</span>
|
|
85
|
+
</code><button type="button">Copy</button></pre>
|
|
86
|
+
|
|
87
|
+
<a id="md:๐-common-usage-patterns" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ Common Usage Patterns<a href="#md:๐-common-usage-patterns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:public-data-no-authentication-required" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Public Data (No Authentication Required)<a href="#md:public-data-no-authentication-required" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-5">// Get alliance information</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">alliance</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-0">getAllianceById</span><span class="hl-1">(</span><span class="hl-8">99005338</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Alliance: </span><span class="hl-6">${</span><span class="hl-4">alliance</span><span class="hl-9">.</span><span class="hl-4">name</span><span class="hl-6">}</span><span class="hl-2"> [</span><span class="hl-6">${</span><span class="hl-4">alliance</span><span class="hl-9">.</span><span class="hl-4">ticker</span><span class="hl-6">}</span><span class="hl-2">]`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get character public information</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">1689391488</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Character: </span><span class="hl-6">${</span><span class="hl-4">character</span><span class="hl-9">.</span><span class="hl-4">name</span><span class="hl-6">}</span><span class="hl-2">`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get corporation information</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">corporation</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1">.</span><span class="hl-0">getCorporationInfo</span><span class="hl-1">(</span><span class="hl-8">98742334</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Corporation: </span><span class="hl-6">${</span><span class="hl-4">corporation</span><span class="hl-9">.</span><span class="hl-4">name</span><span class="hl-6">}</span><span class="hl-2"> [</span><span class="hl-6">${</span><span class="hl-4">corporation</span><span class="hl-9">.</span><span class="hl-4">ticker</span><span class="hl-6">}</span><span class="hl-2">]`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get market prices</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">prices</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getMarketPrices</span><span class="hl-1">();</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Found </span><span class="hl-6">${</span><span class="hl-4">prices</span><span class="hl-9">.</span><span class="hl-4">length</span><span class="hl-6">}</span><span class="hl-2"> market prices`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get solar system information</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">system</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">universe</span><span class="hl-1">.</span><span class="hl-0">getSystemById</span><span class="hl-1">(</span><span class="hl-8">30000142</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`System: </span><span class="hl-6">${</span><span class="hl-4">system</span><span class="hl-9">.</span><span class="hl-4">name</span><span class="hl-6">}</span><span class="hl-2"> (Security: </span><span class="hl-6">${</span><span class="hl-4">system</span><span class="hl-9">.</span><span class="hl-4">security_status</span><span class="hl-6">}</span><span class="hl-2">)`</span><span class="hl-1">);</span>
|
|
88
|
+
</code><button type="button">Copy</button></pre>
|
|
89
|
+
|
|
90
|
+
<a id="md:authenticated-data-access-token-required" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Authenticated Data (Access Token Required)<a href="#md:authenticated-data-access-token-required" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-5">// Initialize with access token</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">authenticatedClient</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'your-app-name'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">accessToken:</span><span class="hl-1"> </span><span class="hl-2">'your-character-access-token'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">characterId</span><span class="hl-1"> = </span><span class="hl-8">1689391488</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Get character's assets</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">assets</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">authenticatedClient</span><span class="hl-1">.</span><span class="hl-4">assets</span><span class="hl-1">.</span><span class="hl-0">getCharacterAssets</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Character has </span><span class="hl-6">${</span><span class="hl-4">assets</span><span class="hl-9">.</span><span class="hl-4">length</span><span class="hl-6">}</span><span class="hl-2"> assets`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get character's wallet balance</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">wallet</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">authenticatedClient</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-0">getCharacterWallet</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Wallet balance: </span><span class="hl-6">${</span><span class="hl-4">wallet</span><span class="hl-9">.</span><span class="hl-0">toLocaleString</span><span class="hl-9">()</span><span class="hl-6">}</span><span class="hl-2"> ISK`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get character's mail</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">mail</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">authenticatedClient</span><span class="hl-1">.</span><span class="hl-4">mail</span><span class="hl-1">.</span><span class="hl-0">getCharacterMail</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Character has </span><span class="hl-6">${</span><span class="hl-4">mail</span><span class="hl-9">.</span><span class="hl-4">length</span><span class="hl-6">}</span><span class="hl-2"> mail messages`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Get character's market orders</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">orders</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">authenticatedClient</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getCharacterOrders</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Character has </span><span class="hl-6">${</span><span class="hl-4">orders</span><span class="hl-9">.</span><span class="hl-4">length</span><span class="hl-6">}</span><span class="hl-2"> active market orders`</span><span class="hl-1">);</span>
|
|
91
|
+
</code><button type="button">Copy</button></pre>
|
|
92
|
+
|
|
93
|
+
<a id="md:complex-workflows" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Complex Workflows<a href="#md:complex-workflows" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-5">// Character Profile Assembly</span><br/><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">getCompleteCharacterProfile</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> [</span><span class="hl-7">character</span><span class="hl-1">, </span><span class="hl-7">portrait</span><span class="hl-1">, </span><span class="hl-7">corporation</span><span class="hl-1">, </span><span class="hl-7">location</span><span class="hl-1">] = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-10">Promise</span><span class="hl-1">.</span><span class="hl-0">all</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPortrait</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">).</span><span class="hl-0">then</span><span class="hl-1">(</span><span class="hl-4">char</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1">.</span><span class="hl-0">getCorporationInfo</span><span class="hl-1">(</span><span class="hl-4">char</span><span class="hl-1">.</span><span class="hl-4">corporation_id</span><span class="hl-1">)</span><br/><span class="hl-1"> ),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">location</span><span class="hl-1">.</span><span class="hl-0">getCharacterLocation</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">)</span><br/><span class="hl-1"> ]);</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">character</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">portrait</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">corporation</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">location</span><br/><span class="hl-1"> };</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Market Analysis</span><br/><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">analyzeMarketData</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">, </span><span class="hl-4">typeId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> [</span><span class="hl-7">prices</span><span class="hl-1">, </span><span class="hl-7">orders</span><span class="hl-1">, </span><span class="hl-7">history</span><span class="hl-1">] = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-10">Promise</span><span class="hl-1">.</span><span class="hl-0">all</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getMarketPrices</span><span class="hl-1">(),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getMarketOrders</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">, { </span><span class="hl-4">type_id:</span><span class="hl-1"> </span><span class="hl-4">typeId</span><span class="hl-1"> }),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getMarketHistory</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">, </span><span class="hl-4">typeId</span><span class="hl-1">)</span><br/><span class="hl-1"> ]);</span><br/><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">currentPrice</span><span class="hl-1"> = </span><span class="hl-4">prices</span><span class="hl-1">.</span><span class="hl-0">find</span><span class="hl-1">(</span><span class="hl-4">p</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">p</span><span class="hl-1">.</span><span class="hl-4">type_id</span><span class="hl-1"> === </span><span class="hl-4">typeId</span><span class="hl-1">)?.</span><span class="hl-4">average_price</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">buyOrders</span><span class="hl-1"> = </span><span class="hl-4">orders</span><span class="hl-1">.</span><span class="hl-0">filter</span><span class="hl-1">(</span><span class="hl-4">o</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">is_buy_order</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">sellOrders</span><span class="hl-1"> = </span><span class="hl-4">orders</span><span class="hl-1">.</span><span class="hl-0">filter</span><span class="hl-1">(</span><span class="hl-4">o</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> !</span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">is_buy_order</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">currentPrice</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">bestBuyPrice:</span><span class="hl-1"> </span><span class="hl-4">Math</span><span class="hl-1">.</span><span class="hl-0">max</span><span class="hl-1">(...</span><span class="hl-4">buyOrders</span><span class="hl-1">.</span><span class="hl-0">map</span><span class="hl-1">(</span><span class="hl-4">o</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1">)),</span><br/><span class="hl-1"> </span><span class="hl-4">bestSellPrice:</span><span class="hl-1"> </span><span class="hl-4">Math</span><span class="hl-1">.</span><span class="hl-0">min</span><span class="hl-1">(...</span><span class="hl-4">sellOrders</span><span class="hl-1">.</span><span class="hl-0">map</span><span class="hl-1">(</span><span class="hl-4">o</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1">)),</span><br/><span class="hl-1"> </span><span class="hl-4">dailyVolume:</span><span class="hl-1"> </span><span class="hl-4">history</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]?.</span><span class="hl-4">volume</span><span class="hl-1"> || </span><span class="hl-8">0</span><br/><span class="hl-1"> };</span><br/><span class="hl-1">}</span>
|
|
94
|
+
</code><button type="button">Copy</button></pre>
|
|
95
|
+
|
|
96
|
+
<a id="md:๐-error-handling" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ Error Handling<a href="#md:๐-error-handling" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The library provides comprehensive error handling with specific error types:</p>
|
|
97
|
+
<pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">ApiError</span><span class="hl-1">, </span><span class="hl-4">ApiErrorType</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-3">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">alliance</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-0">getAllianceById</span><span class="hl-1">(</span><span class="hl-8">99999999</span><span class="hl-1">); </span><span class="hl-5">// Invalid ID</span><br/><span class="hl-1">} </span><span class="hl-3">catch</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1"> </span><span class="hl-6">instanceof</span><span class="hl-1"> </span><span class="hl-10">ApiError</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">switch</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1">.</span><span class="hl-4">type</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-4">ApiErrorType</span><span class="hl-1">.</span><span class="hl-7">NOT_FOUND</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Alliance not found'</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-4">ApiErrorType</span><span class="hl-1">.</span><span class="hl-7">RATE_LIMITED</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Rate limited - retry after:'</span><span class="hl-1">, </span><span class="hl-4">error</span><span class="hl-1">.</span><span class="hl-4">retryAfter</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-4">ApiErrorType</span><span class="hl-1">.</span><span class="hl-7">SERVER_ERROR</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'ESI server error:'</span><span class="hl-1">, </span><span class="hl-4">error</span><span class="hl-1">.</span><span class="hl-4">statusCode</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-4">ApiErrorType</span><span class="hl-1">.</span><span class="hl-7">NETWORK_ERROR</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Network connectivity issue'</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-4">ApiErrorType</span><span class="hl-1">.</span><span class="hl-7">AUTHENTICATION_ERROR</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Invalid or expired access token'</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">default</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Unexpected error:'</span><span class="hl-1">, </span><span class="hl-4">error</span><span class="hl-1">.</span><span class="hl-4">message</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
98
|
+
</code><button type="button">Copy</button></pre>
|
|
99
|
+
|
|
100
|
+
<a id="md:graceful-error-handling-in-complex-workflows" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Graceful Error Handling in Complex Workflows<a href="#md:graceful-error-handling-in-complex-workflows" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">safeCharacterLookup</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Use Promise.allSettled for partial success scenarios</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">results</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-10">Promise</span><span class="hl-1">.</span><span class="hl-0">allSettled</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPortrait</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">location</span><span class="hl-1">.</span><span class="hl-0">getCharacterLocation</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">)</span><br/><span class="hl-1"> ]);</span><br/><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">profile</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1"> = {};</span><br/><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">].</span><span class="hl-4">status</span><span class="hl-1"> === </span><span class="hl-2">'fulfilled'</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1">.</span><span class="hl-4">character</span><span class="hl-1"> = </span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">].</span><span class="hl-4">value</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">1</span><span class="hl-1">].</span><span class="hl-4">status</span><span class="hl-1"> === </span><span class="hl-2">'fulfilled'</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1">.</span><span class="hl-4">portrait</span><span class="hl-1"> = </span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">1</span><span class="hl-1">].</span><span class="hl-4">value</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">2</span><span class="hl-1">].</span><span class="hl-4">status</span><span class="hl-1"> === </span><span class="hl-2">'fulfilled'</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1">.</span><span class="hl-4">location</span><span class="hl-1"> = </span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">2</span><span class="hl-1">].</span><span class="hl-4">value</span><span class="hl-1">;</span><br/><span class="hl-1"> } </span><span class="hl-3">else</span><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">results</span><span class="hl-1">[</span><span class="hl-8">2</span><span class="hl-1">].</span><span class="hl-4">status</span><span class="hl-1"> === </span><span class="hl-2">'rejected'</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">'Location unavailable (character may be offline)'</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1">;</span><br/><span class="hl-1"> } </span><span class="hl-3">catch</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">'Failed to get character data:'</span><span class="hl-1">, </span><span class="hl-4">error</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-6">null</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
101
|
+
</code><button type="button">Copy</button></pre>
|
|
102
|
+
|
|
103
|
+
<a id="md:โก-performance--caching" class="tsd-anchor"></a><h2 class="tsd-anchor-link">โก Performance & Caching<a href="#md:โก-performance--caching" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:intelligent-etag-caching" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Intelligent ETag Caching<a href="#md:intelligent-etag-caching" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>ESI.ts includes a sophisticated ETag caching system that automatically optimizes API calls by avoiding unnecessary data transfers. This feature is <strong>enabled by default</strong> and works transparently with all GET requests.</p>
|
|
104
|
+
<a id="md:how-etag-caching-works" class="tsd-anchor"></a><h4 class="tsd-anchor-link">How ETag Caching Works<a href="#md:how-etag-caching-works" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><p>ETags (Entity Tags) are unique identifiers returned by ESI servers that represent the current version of a resource. When data hasn't changed, the server returns a <code>304 Not Modified</code> status instead of the full data, dramatically reducing bandwidth usage and improving response times.</p>
|
|
105
|
+
<a id="md:basic-usage-automatic" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Basic Usage (Automatic)<a href="#md:basic-usage-automatic" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// ETag caching is enabled by default</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'my-eve-app'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// First call - downloads and caches data</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">alliances1</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-0">getAlliances</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Second call - returns cached data if unchanged (304 response)</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">alliances2</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-0">getAlliances</span><span class="hl-1">(); </span><span class="hl-5">// โก Lightning fast!</span>
|
|
106
|
+
</code><button type="button">Copy</button></pre>
|
|
107
|
+
|
|
108
|
+
<a id="md:custom-cache-configuration" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Custom Cache Configuration<a href="#md:custom-cache-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'my-eve-app'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">enableETagCache:</span><span class="hl-1"> </span><span class="hl-6">true</span><span class="hl-1">, </span><span class="hl-5">// Default: true</span><br/><span class="hl-1"> </span><span class="hl-4">etagCacheConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">maxEntries:</span><span class="hl-1"> </span><span class="hl-8">1000</span><span class="hl-1">, </span><span class="hl-5">// Max cached responses (default: 1000)</span><br/><span class="hl-1"> </span><span class="hl-4">defaultTtl:</span><span class="hl-1"> </span><span class="hl-8">300000</span><span class="hl-1">, </span><span class="hl-5">// Cache TTL in ms (default: 5 minutes)</span><br/><span class="hl-1"> </span><span class="hl-4">cleanupInterval:</span><span class="hl-1"> </span><span class="hl-8">60000</span><span class="hl-1">, </span><span class="hl-5">// Cleanup frequency (default: 1 minute)</span><br/><span class="hl-1"> </span><span class="hl-4">persistToStorage:</span><span class="hl-1"> </span><span class="hl-6">true</span><span class="hl-1">, </span><span class="hl-5">// Save to localStorage (default: false)</span><br/><span class="hl-1"> </span><span class="hl-4">storageKey:</span><span class="hl-1"> </span><span class="hl-2">'my-esi-cache'</span><span class="hl-1"> </span><span class="hl-5">// Custom storage key</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
|
|
109
|
+
</code><button type="button">Copy</button></pre>
|
|
110
|
+
|
|
111
|
+
<a id="md:cache-management" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Cache Management<a href="#md:cache-management" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">// Get cache statistics</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">stats</span><span class="hl-1"> = </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">getCacheStats</span><span class="hl-1">();</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Cache: </span><span class="hl-6">${</span><span class="hl-4">stats</span><span class="hl-9">.</span><span class="hl-4">totalEntries</span><span class="hl-6">}</span><span class="hl-2">/</span><span class="hl-6">${</span><span class="hl-4">stats</span><span class="hl-9">.</span><span class="hl-4">maxEntries</span><span class="hl-6">}</span><span class="hl-2"> entries`</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Hit rate optimization: </span><span class="hl-6">${</span><span class="hl-4">stats</span><span class="hl-9">.</span><span class="hl-4">hitRate</span><span class="hl-6">}</span><span class="hl-2">%`</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Clear cache manually</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">clearCache</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Update cache settings at runtime</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">updateCacheConfig</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">maxEntries:</span><span class="hl-1"> </span><span class="hl-8">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">defaultTtl:</span><span class="hl-1"> </span><span class="hl-8">600000</span><span class="hl-1"> </span><span class="hl-5">// 10 minutes</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Disable caching for specific use cases</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">enableETagCache:</span><span class="hl-1"> </span><span class="hl-6">false</span><span class="hl-1"> </span><span class="hl-5">// Disable caching entirely</span><br/><span class="hl-1">});</span>
|
|
112
|
+
</code><button type="button">Copy</button></pre>
|
|
113
|
+
|
|
114
|
+
<a id="md:performance-benefits" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Performance Benefits<a href="#md:performance-benefits" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
|
|
115
|
+
<li><strong>๐ Faster Response Times</strong>: Cached responses return instantly</li>
|
|
116
|
+
<li><strong>๐ Reduced Bandwidth</strong>: Avoid downloading unchanged data</li>
|
|
117
|
+
<li><strong>๐ Server-Friendly</strong>: Reduces load on ESI servers</li>
|
|
118
|
+
<li><strong>๐ฐ Cost Effective</strong>: Lower data usage for mobile/metered connections</li>
|
|
119
|
+
<li><strong>๐ฏ Smart Caching</strong>: Only caches GET requests with ETags</li>
|
|
120
|
+
</ul>
|
|
121
|
+
<a id="md:cache-behavior" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Cache Behavior<a href="#md:cache-behavior" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><table>
|
|
122
|
+
<thead>
|
|
123
|
+
<tr>
|
|
124
|
+
<th>Scenario</th>
|
|
125
|
+
<th>Behavior</th>
|
|
126
|
+
<th>Performance Impact</th>
|
|
127
|
+
</tr>
|
|
128
|
+
</thead>
|
|
129
|
+
<tbody>
|
|
130
|
+
<tr>
|
|
131
|
+
<td>First API call</td>
|
|
132
|
+
<td>Downloads data, stores ETag</td>
|
|
133
|
+
<td>Normal speed</td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr>
|
|
136
|
+
<td>Data unchanged</td>
|
|
137
|
+
<td>Returns cached data (304)</td>
|
|
138
|
+
<td>โก <strong>~95% faster</strong></td>
|
|
139
|
+
</tr>
|
|
140
|
+
<tr>
|
|
141
|
+
<td>Data changed</td>
|
|
142
|
+
<td>Downloads new data, updates cache</td>
|
|
143
|
+
<td>Normal speed</td>
|
|
144
|
+
</tr>
|
|
145
|
+
<tr>
|
|
146
|
+
<td>Cache expired</td>
|
|
147
|
+
<td>Downloads fresh data</td>
|
|
148
|
+
<td>Normal speed</td>
|
|
149
|
+
</tr>
|
|
150
|
+
<tr>
|
|
151
|
+
<td>Cache full</td>
|
|
152
|
+
<td>Evicts oldest entries automatically</td>
|
|
153
|
+
<td>Minimal impact</td>
|
|
154
|
+
</tr>
|
|
155
|
+
</tbody>
|
|
156
|
+
</table>
|
|
157
|
+
<a id="md:advanced-etag-features" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Advanced ETag Features<a href="#md:advanced-etag-features" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">// Monitor cache performance</span><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">'cacheHit'</span><span class="hl-1">, (</span><span class="hl-4">url</span><span class="hl-1">, </span><span class="hl-4">etag</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Cache hit for </span><span class="hl-6">${</span><span class="hl-4">url</span><span class="hl-6">}</span><span class="hl-2"> with ETag </span><span class="hl-6">${</span><span class="hl-4">etag</span><span class="hl-6">}</span><span class="hl-2">`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">'cacheMiss'</span><span class="hl-1">, (</span><span class="hl-4">url</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Cache miss for </span><span class="hl-6">${</span><span class="hl-4">url</span><span class="hl-6">}</span><span class="hl-2"> - downloading fresh data`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Programmatic cache inspection</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">cache</span><span class="hl-1"> = </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">getETagCache</span><span class="hl-1">();</span><br/><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">cache</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">entry</span><span class="hl-1"> = </span><span class="hl-4">cache</span><span class="hl-1">.</span><span class="hl-0">get</span><span class="hl-1">(</span><span class="hl-2">'https://esi.evetech.net/latest/alliances'</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">entry</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Cached data age: </span><span class="hl-6">${</span><span class="hl-4">Date</span><span class="hl-9">.</span><span class="hl-0">now</span><span class="hl-9">() </span><span class="hl-1">-</span><span class="hl-9"> </span><span class="hl-4">entry</span><span class="hl-9">.</span><span class="hl-4">timestamp</span><span class="hl-6">}</span><span class="hl-2">ms`</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`ETag: </span><span class="hl-6">${</span><span class="hl-4">entry</span><span class="hl-9">.</span><span class="hl-4">etag</span><span class="hl-6">}</span><span class="hl-2">`</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
158
|
+
</code><button type="button">Copy</button></pre>
|
|
159
|
+
|
|
160
|
+
<a id="md:when-etag-caching-helps-most" class="tsd-anchor"></a><h4 class="tsd-anchor-link">When ETag Caching Helps Most<a href="#md:when-etag-caching-helps-most" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
|
|
161
|
+
<li><strong>๐ Market Data</strong>: Price lists that update periodically</li>
|
|
162
|
+
<li><strong>๐ข Corporation/Alliance Info</strong>: Relatively static organizational data</li>
|
|
163
|
+
<li><strong>๐ Universe Data</strong>: Star system, station, and type information</li>
|
|
164
|
+
<li><strong>๐ฅ Character Lists</strong>: Member rosters and public information</li>
|
|
165
|
+
<li><strong>๐ Statistics</strong>: Aggregate data that updates on intervals</li>
|
|
166
|
+
</ul>
|
|
167
|
+
<a id="md:implementation-details" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Implementation Details<a href="#md:implementation-details" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
|
|
168
|
+
<li><strong>Architecture</strong>: Implemented at the core <code>ApiRequestHandler</code> level</li>
|
|
169
|
+
<li><strong>Scope</strong>: Works with ALL GET requests automatically</li>
|
|
170
|
+
<li><strong>Compatibility</strong>: Fully backward compatible - existing code works unchanged</li>
|
|
171
|
+
<li><strong>Thread Safety</strong>: Uses atomic operations for cache management</li>
|
|
172
|
+
<li><strong>Memory Efficient</strong>: Automatic cleanup and size management</li>
|
|
173
|
+
<li><strong>Storage Options</strong>: In-memory (default) or persistent localStorage</li>
|
|
174
|
+
</ul>
|
|
175
|
+
<a id="md:๐ง-advanced-configuration" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ง Advanced Configuration<a href="#md:๐ง-advanced-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:custom-timeout-and-retry-logic" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Custom Timeout and Retry Logic<a href="#md:custom-timeout-and-retry-logic" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'my-eve-app'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">timeout:</span><span class="hl-1"> </span><span class="hl-8">60000</span><span class="hl-1">, </span><span class="hl-5">// 60 second timeout</span><br/><span class="hl-1"> </span><span class="hl-4">retryAttempts:</span><span class="hl-1"> </span><span class="hl-8">5</span><span class="hl-1">, </span><span class="hl-5">// Retry up to 5 times</span><br/><span class="hl-1"> </span><span class="hl-4">baseUrl:</span><span class="hl-1"> </span><span class="hl-2">'https://esi.evetech.net'</span><span class="hl-1"> </span><span class="hl-5">// Custom ESI endpoint (optional)</span><br/><span class="hl-1">});</span>
|
|
176
|
+
</code><button type="button">Copy</button></pre>
|
|
177
|
+
|
|
178
|
+
<a id="md:using-environment-variables" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Using Environment Variables<a href="#md:using-environment-variables" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-5">// Set environment variables</span><br/><span class="hl-5">// ESI_CLIENT_ID=your-app-name</span><br/><span class="hl-5">// ESI_ACCESS_TOKEN=your-token</span><br/><span class="hl-5">// ESI_TIMEOUT=30000</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-4">env</span><span class="hl-1">.</span><span class="hl-7">ESI_CLIENT_ID</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">accessToken:</span><span class="hl-1"> </span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-4">env</span><span class="hl-1">.</span><span class="hl-7">ESI_ACCESS_TOKEN</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">timeout:</span><span class="hl-1"> </span><span class="hl-0">parseInt</span><span class="hl-1">(</span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-4">env</span><span class="hl-1">.</span><span class="hl-7">ESI_TIMEOUT</span><span class="hl-1"> || </span><span class="hl-2">'30000'</span><span class="hl-1">)</span><br/><span class="hl-1">});</span>
|
|
179
|
+
</code><button type="button">Copy</button></pre>
|
|
180
|
+
|
|
181
|
+
<a id="md:๐-real-world-examples" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ Real-World Examples<a href="#md:๐-real-world-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:eve-market-trading-bot-lightweight-version" class="tsd-anchor"></a><h3 class="tsd-anchor-link">EVE Market Trading Bot (Lightweight Version)<a href="#md:eve-market-trading-bot-lightweight-version" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiClientBuilder</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-6">class</span><span class="hl-1"> </span><span class="hl-10">MarketBot</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">private</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">; </span><span class="hl-5">// CustomEsiClient</span><br/><br/><span class="hl-1"> </span><span class="hl-6">constructor</span><span class="hl-1">(</span><span class="hl-4">accessToken</span><span class="hl-1">: </span><span class="hl-10">string</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">// Only load the APIs we actually need</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClientBuilder</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">addClients</span><span class="hl-1">([</span><span class="hl-2">'market'</span><span class="hl-1">, </span><span class="hl-2">'universe'</span><span class="hl-1">])</span><br/><span class="hl-1"> .</span><span class="hl-0">withClientId</span><span class="hl-1">(</span><span class="hl-2">'market-bot-v1'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">withAccessToken</span><span class="hl-1">(</span><span class="hl-4">accessToken</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">build</span><span class="hl-1">();</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-0">findArbitrageOpportunities</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">, </span><span class="hl-4">typeId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> [</span><span class="hl-7">orders</span><span class="hl-1">, </span><span class="hl-7">history</span><span class="hl-1">] = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-10">Promise</span><span class="hl-1">.</span><span class="hl-0">all</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getMarketOrders</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">, { </span><span class="hl-4">type_id:</span><span class="hl-1"> </span><span class="hl-4">typeId</span><span class="hl-1"> }),</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">market</span><span class="hl-1">.</span><span class="hl-0">getMarketHistory</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">, </span><span class="hl-4">typeId</span><span class="hl-1">)</span><br/><span class="hl-1"> ]);</span><br/><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">buyOrders</span><span class="hl-1"> = </span><span class="hl-4">orders</span><span class="hl-1">.</span><span class="hl-0">filter</span><span class="hl-1">(</span><span class="hl-4">o</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">is_buy_order</span><span class="hl-1">).</span><span class="hl-0">sort</span><span class="hl-1">((</span><span class="hl-4">a</span><span class="hl-1">, </span><span class="hl-4">b</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">b</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1"> - </span><span class="hl-4">a</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">sellOrders</span><span class="hl-1"> = </span><span class="hl-4">orders</span><span class="hl-1">.</span><span class="hl-0">filter</span><span class="hl-1">(</span><span class="hl-4">o</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> !</span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">is_buy_order</span><span class="hl-1">).</span><span class="hl-0">sort</span><span class="hl-1">((</span><span class="hl-4">a</span><span class="hl-1">, </span><span class="hl-4">b</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">a</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1"> - </span><span class="hl-4">b</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">buyOrders</span><span class="hl-1">.</span><span class="hl-4">length</span><span class="hl-1"> > </span><span class="hl-8">0</span><span class="hl-1"> && </span><span class="hl-4">sellOrders</span><span class="hl-1">.</span><span class="hl-4">length</span><span class="hl-1"> > </span><span class="hl-8">0</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">spread</span><span class="hl-1"> = </span><span class="hl-4">buyOrders</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">].</span><span class="hl-4">price</span><span class="hl-1"> - </span><span class="hl-4">sellOrders</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">].</span><span class="hl-4">price</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">spreadPercent</span><span class="hl-1"> = (</span><span class="hl-4">spread</span><span class="hl-1"> / </span><span class="hl-4">sellOrders</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">].</span><span class="hl-4">price</span><span class="hl-1">) * </span><span class="hl-8">100</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">profitable:</span><span class="hl-1"> </span><span class="hl-4">spread</span><span class="hl-1"> > </span><span class="hl-8">0</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">spread</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">spreadPercent</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">bestBuy:</span><span class="hl-1"> </span><span class="hl-4">buyOrders</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">],</span><br/><span class="hl-1"> </span><span class="hl-4">bestSell:</span><span class="hl-1"> </span><span class="hl-4">sellOrders</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">],</span><br/><span class="hl-1"> </span><span class="hl-4">dailyVolume:</span><span class="hl-1"> </span><span class="hl-4">history</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]?.</span><span class="hl-4">volume</span><span class="hl-1"> || </span><span class="hl-8">0</span><br/><span class="hl-1"> };</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-6">null</span><span class="hl-1">;</span><br/><span class="hl-1"> } </span><span class="hl-3">catch</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">'Failed to analyze market:'</span><span class="hl-1">, </span><span class="hl-4">error</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-6">null</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
182
|
+
</code><button type="button">Copy</button></pre>
|
|
183
|
+
|
|
184
|
+
<a id="md:corporation-management-dashboard-custom-client-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Corporation Management Dashboard (Custom Client)<a href="#md:corporation-management-dashboard-custom-client-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">CustomEsiClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-6">class</span><span class="hl-1"> </span><span class="hl-10">CorporationManager</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">private</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">: </span><span class="hl-10">CustomEsiClient</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-6">constructor</span><span class="hl-1">(</span><span class="hl-4">accessToken</span><span class="hl-1">: </span><span class="hl-10">string</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">// Only load corporation-related APIs</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">CustomEsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'corp-manager'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">accessToken</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">clients:</span><span class="hl-1"> [</span><span class="hl-2">'corporations'</span><span class="hl-1">, </span><span class="hl-2">'characters'</span><span class="hl-1">, </span><span class="hl-2">'wallet'</span><span class="hl-1">]</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-0">getCorporationOverview</span><span class="hl-1">(</span><span class="hl-4">corporationId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> [</span><span class="hl-7">corp</span><span class="hl-1">, </span><span class="hl-7">members</span><span class="hl-1">, </span><span class="hl-7">wallets</span><span class="hl-1">] = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-10">Promise</span><span class="hl-1">.</span><span class="hl-0">all</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1">.</span><span class="hl-0">getCorporationInfo</span><span class="hl-1">(</span><span class="hl-4">corporationId</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">corporations</span><span class="hl-1">.</span><span class="hl-0">getCorporationMembers</span><span class="hl-1">(</span><span class="hl-4">corporationId</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-0">getCorporationWallets</span><span class="hl-1">(</span><span class="hl-4">corporationId</span><span class="hl-1">)</span><br/><span class="hl-1"> ]);</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">corporation:</span><span class="hl-1"> </span><span class="hl-4">corp</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">memberCount:</span><span class="hl-1"> </span><span class="hl-4">members</span><span class="hl-1">.</span><span class="hl-4">length</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">totalBalance:</span><span class="hl-1"> </span><span class="hl-4">wallets</span><span class="hl-1">.</span><span class="hl-0">reduce</span><span class="hl-1">((</span><span class="hl-4">sum</span><span class="hl-1">, </span><span class="hl-4">wallet</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">sum</span><span class="hl-1"> + </span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-4">balance</span><span class="hl-1">, </span><span class="hl-8">0</span><span class="hl-1">)</span><br/><span class="hl-1"> };</span><br/><span class="hl-1"> } </span><span class="hl-3">catch</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1"> </span><span class="hl-6">instanceof</span><span class="hl-1"> </span><span class="hl-10">ApiError</span><span class="hl-1"> && </span><span class="hl-4">error</span><span class="hl-1">.</span><span class="hl-4">type</span><span class="hl-1"> === </span><span class="hl-4">ApiErrorType</span><span class="hl-1">.</span><span class="hl-7">AUTHENTICATION_ERROR</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">throw</span><span class="hl-1"> </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">Error</span><span class="hl-1">(</span><span class="hl-2">'Insufficient permissions to access corporation data'</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-3">throw</span><span class="hl-1"> </span><span class="hl-4">error</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
185
|
+
</code><button type="button">Copy</button></pre>
|
|
186
|
+
|
|
187
|
+
<a id="md:simple-character-lookup-direct-api" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Simple Character Lookup (Direct API)<a href="#md:simple-character-lookup-direct-api" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiApiFactory</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Ultra-lightweight: just one API, one function</span><br/><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">lookupCharacter</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">characterClient</span><span class="hl-1"> = </span><span class="hl-4">EsiApiFactory</span><span class="hl-1">.</span><span class="hl-0">createCharacterClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'simple-lookup'</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-4">characterId</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-4">character</span><span class="hl-1">.</span><span class="hl-4">body</span><span class="hl-1">.</span><span class="hl-4">name</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Usage</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">name</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-0">lookupCharacter</span><span class="hl-1">(</span><span class="hl-8">1689391488</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-4">name</span><span class="hl-1">); </span><span class="hl-5">// "deiseman"</span>
|
|
188
|
+
</code><button type="button">Copy</button></pre>
|
|
189
|
+
|
|
190
|
+
<a id="md:direct-api-class-usage" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Direct API Class Usage<a href="#md:direct-api-class-usage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">CharacterClient</span><span class="hl-1">, </span><span class="hl-4">ApiClientBuilder</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Maximum control - build exactly what you need</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">apiClient</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">ApiClientBuilder</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">setClientId</span><span class="hl-1">(</span><span class="hl-2">'direct-usage'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">setLink</span><span class="hl-1">(</span><span class="hl-2">'https://esi.evetech.net'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">build</span><span class="hl-1">();</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">characterClient</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">CharacterClient</span><span class="hl-1">(</span><span class="hl-4">apiClient</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Direct usage without any wrapper</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">portrait</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">characterClient</span><span class="hl-1">.</span><span class="hl-0">getCharacterPortrait</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span>
|
|
191
|
+
</code><button type="button">Copy</button></pre>
|
|
192
|
+
|
|
193
|
+
<a id="md:microservice-example-single-responsibility" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Microservice Example (Single Responsibility)<a href="#md:microservice-example-single-responsibility" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiApiFactory</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// A microservice that only needs market data</span><br/><span class="hl-6">class</span><span class="hl-1"> </span><span class="hl-10">PriceService</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">private</span><span class="hl-1"> </span><span class="hl-4">marketClient</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-6">constructor</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-5">// Only load what this service needs</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">marketClient</span><span class="hl-1"> = </span><span class="hl-4">EsiApiFactory</span><span class="hl-1">.</span><span class="hl-0">createMarketClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'price-service-v1'</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-0">getCurrentPrice</span><span class="hl-1">(</span><span class="hl-4">typeId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">): </span><span class="hl-10">Promise</span><span class="hl-1"><</span><span class="hl-10">number</span><span class="hl-1">> {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">prices</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">marketClient</span><span class="hl-1">.</span><span class="hl-0">getMarketPrices</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">price</span><span class="hl-1"> = </span><span class="hl-4">prices</span><span class="hl-1">.</span><span class="hl-4">body</span><span class="hl-1">.</span><span class="hl-0">find</span><span class="hl-1">((</span><span class="hl-4">p</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">p</span><span class="hl-1">.</span><span class="hl-4">type_id</span><span class="hl-1"> === </span><span class="hl-4">typeId</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-4">price</span><span class="hl-1">?.</span><span class="hl-4">average_price</span><span class="hl-1"> || </span><span class="hl-8">0</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-0">getBestPrices</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">, </span><span class="hl-4">typeId</span><span class="hl-1">: </span><span class="hl-10">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">orders</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">marketClient</span><span class="hl-1">.</span><span class="hl-0">getMarketOrders</span><span class="hl-1">(</span><span class="hl-4">regionId</span><span class="hl-1">, { </span><span class="hl-4">type_id:</span><span class="hl-1"> </span><span class="hl-4">typeId</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">buyOrders</span><span class="hl-1"> = </span><span class="hl-4">orders</span><span class="hl-1">.</span><span class="hl-4">body</span><span class="hl-1">.</span><span class="hl-0">filter</span><span class="hl-1">((</span><span class="hl-4">o</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">is_buy_order</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">sellOrders</span><span class="hl-1"> = </span><span class="hl-4">orders</span><span class="hl-1">.</span><span class="hl-4">body</span><span class="hl-1">.</span><span class="hl-0">filter</span><span class="hl-1">((</span><span class="hl-4">o</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> !</span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">is_buy_order</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">bestBuy:</span><span class="hl-1"> </span><span class="hl-4">Math</span><span class="hl-1">.</span><span class="hl-0">max</span><span class="hl-1">(...</span><span class="hl-4">buyOrders</span><span class="hl-1">.</span><span class="hl-0">map</span><span class="hl-1">((</span><span class="hl-4">o</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1">)),</span><br/><span class="hl-1"> </span><span class="hl-4">bestSell:</span><span class="hl-1"> </span><span class="hl-4">Math</span><span class="hl-1">.</span><span class="hl-0">min</span><span class="hl-1">(...</span><span class="hl-4">sellOrders</span><span class="hl-1">.</span><span class="hl-0">map</span><span class="hl-1">((</span><span class="hl-4">o</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">o</span><span class="hl-1">.</span><span class="hl-4">price</span><span class="hl-1">))</span><br/><span class="hl-1"> };</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
194
|
+
</code><button type="button">Copy</button></pre>
|
|
195
|
+
|
|
196
|
+
<a id="md:๐งช-testing" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐งช Testing<a href="#md:๐งช-testing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:running-tests" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Running Tests<a href="#md:running-tests" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="bash"><span class="hl-5"># Run unit tests</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">test</span><br/><br/><span class="hl-5"># Run unit tests with coverage</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">coverage</span><br/><br/><span class="hl-5"># Run BDD tests (behavioral scenarios)</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">bdd</span><br/><br/><span class="hl-5"># Run specific BDD test suites</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">bdd:alliance</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">bdd:character</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">bdd:market</span><br/><br/><span class="hl-5"># Run all tests</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">test:all</span>
|
|
197
|
+
</code><button type="button">Copy</button></pre>
|
|
198
|
+
|
|
199
|
+
<a id="md:๐-working-examples" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ Working Examples<a href="#md:๐-working-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:try-the-examples" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Try the Examples<a href="#md:try-the-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>ESI.ts includes working examples that demonstrate real API usage:</p>
|
|
200
|
+
<pre><code class="bash"><span class="hl-5"># Run the complete character profile example</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">example</span><br/><br/><span class="hl-5"># Run flexible API usage examples (all 5 approaches)</span><br/><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-2">examples:flexible</span>
|
|
201
|
+
</code><button type="button">Copy</button></pre>
|
|
202
|
+
|
|
203
|
+
<a id="md:character-profile-example" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Character Profile Example<a href="#md:character-profile-example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>The main example (<code>npm run example</code>) demonstrates:</p>
|
|
204
|
+
<ul>
|
|
205
|
+
<li>โ
Complete character profile assembly</li>
|
|
206
|
+
<li>โ
Parallel API calls for efficiency</li>
|
|
207
|
+
<li>โ
Error handling and graceful degradation</li>
|
|
208
|
+
<li>โ
Resource cleanup</li>
|
|
209
|
+
<li>โ
Performance timing</li>
|
|
210
|
+
</ul>
|
|
211
|
+
<p><strong>Sample Output:</strong></p>
|
|
212
|
+
<pre><code><span class="hl-1">๐ </span><span class="hl-7">ESI</span><span class="hl-1">.</span><span class="hl-4">ts</span><span class="hl-1"> </span><span class="hl-4">Character</span><span class="hl-1"> </span><span class="hl-4">Profile</span><span class="hl-1"> </span><span class="hl-4">Example</span><br/><span class="hl-1">=====================================</span><br/><br/><span class="hl-1">๐ </span><span class="hl-4">Gathering</span><span class="hl-1"> </span><span class="hl-4">complete</span><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1"> </span><span class="hl-4">for</span><span class="hl-1"> </span><span class="hl-4">character</span><span class="hl-1"> </span><span class="hl-11">ID</span><span class="hl-1">: </span><span class="hl-8">1689391488</span><br/><span class="hl-1">๐ </span><span class="hl-4">Fetching</span><span class="hl-1"> </span><span class="hl-4">basic</span><span class="hl-1"> </span><span class="hl-4">character</span><span class="hl-1"> </span><span class="hl-4">information</span><span class="hl-1">...</span><br/><span class="hl-1">๐ </span><span class="hl-4">Fetching</span><span class="hl-1"> </span><span class="hl-4">detailed</span><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1"> </span><span class="hl-4">data</span><span class="hl-1"> </span><span class="hl-6">in</span><span class="hl-1"> </span><span class="hl-4">parallel</span><span class="hl-1">...</span><br/><br/><span class="hl-1">============================================================</span><br/><span class="hl-1">๐ฏ </span><span class="hl-7">CHARACTER</span><span class="hl-1"> </span><span class="hl-7">PROFILE</span><span class="hl-1"> </span><span class="hl-7">SUMMARY</span><br/><span class="hl-1">============================================================</span><br/><span class="hl-1">๐ค </span><span class="hl-11">Name</span><span class="hl-1">: </span><span class="hl-4">deiseman</span><br/><span class="hl-1">๐ </span><span class="hl-4">Character</span><span class="hl-1"> </span><span class="hl-11">ID</span><span class="hl-1">: </span><span class="hl-8">1689391488</span><br/><span class="hl-1">๐ </span><span class="hl-11">Birthday</span><span class="hl-1">: </span><span class="hl-8">2</span><span class="hl-1">/</span><span class="hl-8">3</span><span class="hl-1">/</span><span class="hl-8">2008</span><br/><span class="hl-1">โ๏ธ </span><span class="hl-4">Security</span><span class="hl-1"> </span><span class="hl-11">Status</span><span class="hl-1">: </span><span class="hl-8">0.16</span><br/><br/><span class="hl-1">๐ข </span><span class="hl-11">Corporation</span><span class="hl-1">: </span><span class="hl-4">Brittas</span><span class="hl-1"> </span><span class="hl-4">Empire</span><span class="hl-1"> [</span><span class="hl-7">BREMP</span><span class="hl-1">]</span><br/><span class="hl-1">๐ฅ </span><span class="hl-11">Members</span><span class="hl-1">: </span><span class="hl-8">360</span><br/><span class="hl-1">๐ค </span><span class="hl-11">Alliance</span><span class="hl-1">: </span><span class="hl-4">Pandemic</span><span class="hl-1"> </span><span class="hl-4">Horde</span><span class="hl-1"> [</span><span class="hl-7">REKTD</span><span class="hl-1">]</span><br/><span class="hl-1">๐ </span><span class="hl-11">Founded</span><span class="hl-1">: </span><span class="hl-8">2</span><span class="hl-1">/</span><span class="hl-8">4</span><span class="hl-1">/</span><span class="hl-8">2015</span><br/><br/><span class="hl-1">๐ผ๏ธ </span><span class="hl-4">Portrait</span><span class="hl-1"> </span><span class="hl-11">URLs</span><span class="hl-1">:</span><br/><span class="hl-1"> ๐ฑ 64</span><span class="hl-11">x64</span><span class="hl-1">: </span><span class="hl-11">https</span><span class="hl-1">:</span><span class="hl-5">//images.evetech.net/characters/1689391488/portrait?tenant=tranquility&size=64</span><br/><span class="hl-1"> ๐ฅ๏ธ 128</span><span class="hl-11">x128</span><span class="hl-1">: </span><span class="hl-11">https</span><span class="hl-1">:</span><span class="hl-5">//images.evetech.net/characters/1689391488/portrait?tenant=tranquility&size=128</span><br/><span class="hl-1"> ๐ผ๏ธ 256</span><span class="hl-11">x256</span><span class="hl-1">: </span><span class="hl-11">https</span><span class="hl-1">:</span><span class="hl-5">//images.evetech.net/characters/1689391488/portrait?tenant=tranquility&size=256</span><br/><span class="hl-1"> ๐บ 512</span><span class="hl-11">x512</span><span class="hl-1">: </span><span class="hl-11">https</span><span class="hl-1">:</span><span class="hl-5">//images.evetech.net/characters/1689391488/portrait?tenant=tranquility&size=512</span><br/><br/><span class="hl-1">๐ </span><span class="hl-4">Current</span><span class="hl-1"> </span><span class="hl-11">Location</span><span class="hl-1">: </span><span class="hl-0">Unavailable</span><span class="hl-1"> (</span><span class="hl-4">character</span><span class="hl-1"> </span><span class="hl-4">may</span><span class="hl-1"> </span><span class="hl-4">be</span><span class="hl-1"> </span><span class="hl-4">offline</span><span class="hl-1">)</span><br/><span class="hl-1">============================================================</span><br/><br/><span class="hl-1">โฑ๏ธ </span><span class="hl-4">Total</span><span class="hl-1"> </span><span class="hl-4">execution</span><span class="hl-1"> </span><span class="hl-11">time</span><span class="hl-1">: 154</span><span class="hl-4">ms</span><br/><span class="hl-1">โ
</span><span class="hl-4">Character</span><span class="hl-1"> </span><span class="hl-4">profile</span><span class="hl-1"> </span><span class="hl-4">retrieved</span><span class="hl-1"> </span><span class="hl-4">successfully</span><span class="hl-1">!</span>
|
|
213
|
+
</code><button>Copy</button></pre>
|
|
214
|
+
|
|
215
|
+
<a id="md:flexible-api-examples" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Flexible API Examples<a href="#md:flexible-api-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>The flexible examples (<code>npm run examples:flexible</code>) demonstrate:</p>
|
|
216
|
+
<ul>
|
|
217
|
+
<li>โ
Full ESI Client (all APIs)</li>
|
|
218
|
+
<li>โ
Custom lightweight client (selected APIs)</li>
|
|
219
|
+
<li>โ
Builder pattern usage</li>
|
|
220
|
+
<li>โ
Individual API clients</li>
|
|
221
|
+
<li>โ
Direct API class instantiation</li>
|
|
222
|
+
<li>โ
Performance comparisons</li>
|
|
223
|
+
<li>โ
Microservice example</li>
|
|
224
|
+
</ul>
|
|
225
|
+
<p><strong>Sample Output:</strong></p>
|
|
226
|
+
<pre><code><span class="hl-1">๐ </span><span class="hl-7">ESI</span><span class="hl-1">.</span><span class="hl-4">ts</span><span class="hl-1"> </span><span class="hl-4">Flexible</span><span class="hl-1"> </span><span class="hl-7">API</span><span class="hl-1"> </span><span class="hl-4">Usage</span><span class="hl-1"> </span><span class="hl-4">Examples</span><br/><span class="hl-1">=====================================</span><br/><br/><span class="hl-1">1๏ธโฃ </span><span class="hl-4">Full</span><span class="hl-1"> </span><span class="hl-7">ESI</span><span class="hl-1"> </span><span class="hl-0">Client</span><span class="hl-1"> (</span><span class="hl-4">All</span><span class="hl-1"> </span><span class="hl-4">APIs</span><span class="hl-1">)</span><br/><span class="hl-1">โ
</span><span class="hl-11">Character</span><span class="hl-1">: </span><span class="hl-0">deiseman</span><span class="hl-1"> (</span><span class="hl-4">using</span><span class="hl-1"> </span><span class="hl-4">full</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">)</span><br/><br/><span class="hl-1">2๏ธโฃ </span><span class="hl-4">Custom</span><span class="hl-1"> </span><span class="hl-4">Lightweight</span><span class="hl-1"> </span><span class="hl-0">Client</span><span class="hl-1"> (</span><span class="hl-4">Selected</span><span class="hl-1"> </span><span class="hl-4">APIs</span><span class="hl-1">)</span><br/><span class="hl-1">โ
</span><span class="hl-11">Character</span><span class="hl-1">: </span><span class="hl-0">deiseman</span><span class="hl-1"> (</span><span class="hl-4">using</span><span class="hl-1"> </span><span class="hl-4">custom</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">)</span><br/><span class="hl-1">๐ </span><span class="hl-4">Enabled</span><span class="hl-1"> </span><span class="hl-11">clients</span><span class="hl-1">: </span><span class="hl-4">characters</span><span class="hl-1">, </span><span class="hl-4">corporations</span><br/><br/><span class="hl-1">3๏ธโฃ </span><span class="hl-4">Builder</span><span class="hl-1"> </span><span class="hl-4">Pattern</span><br/><span class="hl-1">โ
</span><span class="hl-11">Character</span><span class="hl-1">: </span><span class="hl-0">deiseman</span><span class="hl-1"> (</span><span class="hl-4">using</span><span class="hl-1"> </span><span class="hl-4">builder</span><span class="hl-1"> </span><span class="hl-4">pattern</span><span class="hl-1">)</span><br/><br/><span class="hl-1">4๏ธโฃ </span><span class="hl-4">Individual</span><span class="hl-1"> </span><span class="hl-7">API</span><span class="hl-1"> </span><span class="hl-0">Client</span><span class="hl-1"> (</span><span class="hl-4">Ultra</span><span class="hl-1"> </span><span class="hl-4">Lightweight</span><span class="hl-1">)</span><br/><span class="hl-1">โ
</span><span class="hl-11">Character</span><span class="hl-1">: </span><span class="hl-0">deiseman</span><span class="hl-1"> (</span><span class="hl-4">using</span><span class="hl-1"> </span><span class="hl-4">standalone</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">)</span><br/><br/><span class="hl-1">5๏ธโฃ </span><span class="hl-4">Direct</span><span class="hl-1"> </span><span class="hl-7">API</span><span class="hl-1"> </span><span class="hl-4">Class</span><span class="hl-1"> </span><span class="hl-4">Instantiation</span><br/><span class="hl-1">โ
</span><span class="hl-11">Character</span><span class="hl-1">: </span><span class="hl-0">deiseman</span><span class="hl-1"> (</span><span class="hl-4">using</span><span class="hl-1"> </span><span class="hl-4">direct</span><span class="hl-1"> </span><span class="hl-4">instantiation</span><span class="hl-1">)</span><br/><br/><span class="hl-1">๐ฏ </span><span class="hl-4">Performance</span><span class="hl-1"> </span><span class="hl-4">Comparison</span><br/><span class="hl-1">=========================</span><br/><span class="hl-1">โฑ๏ธ </span><span class="hl-4">Startup</span><span class="hl-1"> </span><span class="hl-4">time</span><span class="hl-1"> </span><span class="hl-11">comparison</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-4">Full</span><span class="hl-1"> </span><span class="hl-11">Client</span><span class="hl-1">: 1</span><span class="hl-4">ms</span><br/><span class="hl-1"> </span><span class="hl-4">Custom</span><span class="hl-1"> </span><span class="hl-0">Client</span><span class="hl-1"> (</span><span class="hl-8">1</span><span class="hl-1"> </span><span class="hl-7">API</span><span class="hl-1">): 0</span><span class="hl-4">ms</span><br/><span class="hl-1"> </span><span class="hl-4">Individual</span><span class="hl-1"> </span><span class="hl-11">Client</span><span class="hl-1">: 0</span><span class="hl-4">ms</span><br/><br/><span class="hl-1">๐ฐ </span><span class="hl-4">Microservice</span><span class="hl-1"> </span><span class="hl-11">Example</span><span class="hl-1">: </span><span class="hl-4">Price</span><span class="hl-1"> </span><span class="hl-4">Service</span><br/><span class="hl-1">======================================</span><br/><span class="hl-1">๐ </span><span class="hl-4">Tritanium</span><span class="hl-1"> </span><span class="hl-4">average</span><span class="hl-1"> </span><span class="hl-11">price</span><span class="hl-1">: </span><span class="hl-8">3.78</span><span class="hl-1"> </span><span class="hl-7">ISK</span>
|
|
227
|
+
</code><button>Copy</button></pre>
|
|
228
|
+
|
|
229
|
+
<a id="md:example-files" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example Files<a href="#md:example-files" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><table>
|
|
230
|
+
<thead>
|
|
231
|
+
<tr>
|
|
232
|
+
<th>File</th>
|
|
233
|
+
<th>Purpose</th>
|
|
234
|
+
<th>Command</th>
|
|
235
|
+
</tr>
|
|
236
|
+
</thead>
|
|
237
|
+
<tbody>
|
|
238
|
+
<tr>
|
|
239
|
+
<td><code>src/index.ts</code></td>
|
|
240
|
+
<td>Character profile assembly</td>
|
|
241
|
+
<td><code>npm run example</code></td>
|
|
242
|
+
</tr>
|
|
243
|
+
<tr>
|
|
244
|
+
<td><code>demo/flexible-examples.ts</code></td>
|
|
245
|
+
<td>All flexible API patterns</td>
|
|
246
|
+
<td><code>npm run examples:flexible</code></td>
|
|
247
|
+
</tr>
|
|
248
|
+
</tbody>
|
|
249
|
+
</table>
|
|
250
|
+
<a id="md:learning-path" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Learning Path<a href="#md:learning-path" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><ol>
|
|
251
|
+
<li><strong>Start Here</strong>: Run <code>npm run example</code> to see a complete real-world workflow</li>
|
|
252
|
+
<li><strong>Explore Options</strong>: Run <code>npm run examples:flexible</code> to see all the different ways to use the API</li>
|
|
253
|
+
<li><strong>Choose Your Approach</strong>: Pick the method that best fits your use case</li>
|
|
254
|
+
<li><strong>Build Your App</strong>: Use the examples as templates for your own application</li>
|
|
255
|
+
</ol>
|
|
256
|
+
<a id="md:testing-your-applications" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Testing Your Applications<a href="#md:testing-your-applications" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">EsiClient</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">TestDataFactory</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">'@lgriffin/esi.ts'</span><span class="hl-1">;</span><br/><br/><span class="hl-0">describe</span><span class="hl-1">(</span><span class="hl-2">'My EVE Application'</span><span class="hl-1">, () </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">let</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">: </span><span class="hl-10">EsiClient</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-0">beforeEach</span><span class="hl-1">(() </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'test-client'</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-0">afterEach</span><span class="hl-1">(</span><span class="hl-6">async</span><span class="hl-1"> () </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">shutdown</span><span class="hl-1">();</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-0">it</span><span class="hl-1">(</span><span class="hl-2">'should handle character lookup'</span><span class="hl-1">, </span><span class="hl-6">async</span><span class="hl-1"> () </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Mock data for testing</span><br/><span class="hl-1"> </span><span class="hl-4">jest</span><span class="hl-1">.</span><span class="hl-0">spyOn</span><span class="hl-1">(</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">, </span><span class="hl-2">'getCharacterPublicInfo'</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">mockResolvedValue</span><span class="hl-1">(</span><span class="hl-4">TestDataFactory</span><span class="hl-1">.</span><span class="hl-0">createCharacterInfo</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">character_id:</span><span class="hl-1"> </span><span class="hl-8">123456</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">name:</span><span class="hl-1"> </span><span class="hl-2">'Test Character'</span><br/><span class="hl-1"> }));</span><br/><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">character</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">characters</span><span class="hl-1">.</span><span class="hl-0">getCharacterPublicInfo</span><span class="hl-1">(</span><span class="hl-8">123456</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">expect</span><span class="hl-1">(</span><span class="hl-4">character</span><span class="hl-1">.</span><span class="hl-4">name</span><span class="hl-1">).</span><span class="hl-0">toBe</span><span class="hl-1">(</span><span class="hl-2">'Test Character'</span><span class="hl-1">);</span><br/><span class="hl-1"> });</span><br/><span class="hl-1">});</span>
|
|
257
|
+
</code><button type="button">Copy</button></pre>
|
|
258
|
+
|
|
259
|
+
<a id="md:๐ ๏ธ-resource-management" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ ๏ธ Resource Management<a href="#md:๐ ๏ธ-resource-management" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:proper-cleanup" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Proper Cleanup<a href="#md:proper-cleanup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-5">// Always clean up resources when done</span><br/><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">myApplication</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'my-app'</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-3">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Your application logic here</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">alliance</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-0">getAllianceById</span><span class="hl-1">(</span><span class="hl-8">99005338</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-4">name</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><span class="hl-3">finally</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Important: Always shutdown the client</span><br/><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">shutdown</span><span class="hl-1">();</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Or use a try-with-resources pattern</span><br/><span class="hl-6">class</span><span class="hl-1"> </span><span class="hl-10">EsiClientManager</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">private</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">: </span><span class="hl-10">EsiClient</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-6">constructor</span><span class="hl-1">(</span><span class="hl-4">config</span><span class="hl-1">: </span><span class="hl-10">any</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClient</span><span class="hl-1">(</span><span class="hl-4">config</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-0">use</span><span class="hl-1"><</span><span class="hl-10">T</span><span class="hl-1">>(</span><span class="hl-0">callback</span><span class="hl-1">: (</span><span class="hl-4">client</span><span class="hl-1">: </span><span class="hl-10">EsiClient</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-10">Promise</span><span class="hl-1"><</span><span class="hl-10">T</span><span class="hl-1">>): </span><span class="hl-10">Promise</span><span class="hl-1"><</span><span class="hl-10">T</span><span class="hl-1">> {</span><br/><span class="hl-1"> </span><span class="hl-3">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1">(</span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><span class="hl-3">finally</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-6">this</span><span class="hl-1">.</span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-0">shutdown</span><span class="hl-1">();</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Usage</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">manager</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">EsiClientManager</span><span class="hl-1">({ </span><span class="hl-4">clientId:</span><span class="hl-1"> </span><span class="hl-2">'my-app'</span><span class="hl-1"> });</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">result</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">manager</span><span class="hl-1">.</span><span class="hl-0">use</span><span class="hl-1">(</span><span class="hl-6">async</span><span class="hl-1"> (</span><span class="hl-4">client</span><span class="hl-1">) </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-4">alliance</span><span class="hl-1">.</span><span class="hl-0">getAllianceById</span><span class="hl-1">(</span><span class="hl-8">99005338</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
|
|
260
|
+
</code><button type="button">Copy</button></pre>
|
|
261
|
+
|
|
262
|
+
<a id="md:๐ค-contributing" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ค Contributing<a href="#md:๐ค-contributing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ol>
|
|
263
|
+
<li>Fork the repository</li>
|
|
264
|
+
<li>Create a feature branch</li>
|
|
265
|
+
<li>Write tests for your changes</li>
|
|
266
|
+
<li>Ensure all tests pass: <code>npm test && npm run bdd</code></li>
|
|
267
|
+
<li>Open a Pull Request</li>
|
|
268
|
+
</ol>
|
|
269
|
+
<a id="md:๐-license" class="tsd-anchor"></a><h2 class="tsd-anchor-link">๐ License<a href="#md:๐-license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>GPL-3.0-or-later - see the <a href="media/LICENSE">LICENSE</a> file for details.</p>
|
|
270
|
+
<hr>
|
|
271
|
+
<p><strong>Happy coding, capsuleers! o7</strong></p>
|
|
272
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:esits"><span>ESI.ts</span></a><ul><li><a href="#md:๐-features"><span>๐ <wbr/>Features</span></a></li><li><a href="#md:๐ฆ-installation"><span>๐ฆ <wbr/>Installation</span></a></li><li><a href="#md:๐ง-getting-started"><span>๐ง <wbr/>Getting <wbr/>Started</span></a></li><li><ul><li><a href="#md:1-full-esi-client-all-apis"><span>1. <wbr/>Full ESI <wbr/>Client (<wbr/>All APIs)</span></a></li><li><a href="#md:2-custom-lightweight-client-selected-apis"><span>2. <wbr/>Custom <wbr/>Lightweight <wbr/>Client (<wbr/>Selected APIs)</span></a></li><li><a href="#md:3-builder-pattern-for-custom-clients"><span>3. <wbr/>Builder <wbr/>Pattern for <wbr/>Custom <wbr/>Clients</span></a></li><li><a href="#md:4-individual-api-clients-ultra-lightweight"><span>4. <wbr/>Individual API <wbr/>Clients (<wbr/>Ultra <wbr/>Lightweight)</span></a></li><li><a href="#md:5-direct-api-class-instantiation"><span>5. <wbr/>Direct API <wbr/>Class <wbr/>Instantiation</span></a></li></ul></li><li><a href="#md:๐-client-architecture"><span>๐ <wbr/>Client <wbr/>Architecture</span></a></li><li><ul><li><a href="#md:available-client-types"><span>Available <wbr/>Client <wbr/>Types</span></a></li></ul></li><li><a href="#md:๐ฏ-choosing-the-right-approach"><span>๐ฏ <wbr/>Choosing the <wbr/>Right <wbr/>Approach</span></a></li><li><ul><li><a href="#md:when-to-use-each-method"><span>When to <wbr/>Use <wbr/>Each <wbr/>Method</span></a></li><li><a href="#md:practical-examples-by-use-case"><span>Practical <wbr/>Examples by <wbr/>Use <wbr/>Case</span></a></li><li><ul><li><a href="#md:character-lookup-tool-ultra-lightweight"><span>Character <wbr/>Lookup <wbr/>Tool (<wbr/>Ultra <wbr/>Lightweight)</span></a></li><li><a href="#md:trading-bot-selected-apis"><span>Trading <wbr/>Bot (<wbr/>Selected APIs)</span></a></li><li><a href="#md:corporation-management-dashboard-custom-client"><span>Corporation <wbr/>Management <wbr/>Dashboard (<wbr/>Custom <wbr/>Client)</span></a></li></ul></li></ul></li><li><a href="#md:๐-common-usage-patterns"><span>๐ <wbr/>Common <wbr/>Usage <wbr/>Patterns</span></a></li><li><ul><li><a href="#md:public-data-no-authentication-required"><span>Public <wbr/>Data (<wbr/>No <wbr/>Authentication <wbr/>Required)</span></a></li><li><a href="#md:authenticated-data-access-token-required"><span>Authenticated <wbr/>Data (<wbr/>Access <wbr/>Token <wbr/>Required)</span></a></li><li><a href="#md:complex-workflows"><span>Complex <wbr/>Workflows</span></a></li></ul></li><li><a href="#md:๐-error-handling"><span>๐ <wbr/>Error <wbr/>Handling</span></a></li><li><ul><li><a href="#md:graceful-error-handling-in-complex-workflows"><span>Graceful <wbr/>Error <wbr/>Handling in <wbr/>Complex <wbr/>Workflows</span></a></li></ul></li><li><a href="#md:โก-performance--caching"><span>โก <wbr/>Performance & <wbr/>Caching</span></a></li><li><ul><li><a href="#md:intelligent-etag-caching"><span>Intelligent ETag <wbr/>Caching</span></a></li><li><ul><li><a href="#md:how-etag-caching-works"><span>How ETag <wbr/>Caching <wbr/>Works</span></a></li><li><a href="#md:basic-usage-automatic"><span>Basic <wbr/>Usage (<wbr/>Automatic)</span></a></li><li><a href="#md:custom-cache-configuration"><span>Custom <wbr/>Cache <wbr/>Configuration</span></a></li><li><a href="#md:cache-management"><span>Cache <wbr/>Management</span></a></li><li><a href="#md:performance-benefits"><span>Performance <wbr/>Benefits</span></a></li><li><a href="#md:cache-behavior"><span>Cache <wbr/>Behavior</span></a></li><li><a href="#md:advanced-etag-features"><span>Advanced ETag <wbr/>Features</span></a></li><li><a href="#md:when-etag-caching-helps-most"><span>When ETag <wbr/>Caching <wbr/>Helps <wbr/>Most</span></a></li><li><a href="#md:implementation-details"><span>Implementation <wbr/>Details</span></a></li></ul></li></ul></li><li><a href="#md:๐ง-advanced-configuration"><span>๐ง <wbr/>Advanced <wbr/>Configuration</span></a></li><li><ul><li><a href="#md:custom-timeout-and-retry-logic"><span>Custom <wbr/>Timeout and <wbr/>Retry <wbr/>Logic</span></a></li><li><a href="#md:using-environment-variables"><span>Using <wbr/>Environment <wbr/>Variables</span></a></li></ul></li><li><a href="#md:๐-real-world-examples"><span>๐ <wbr/>Real-<wbr/>World <wbr/>Examples</span></a></li><li><ul><li><a href="#md:eve-market-trading-bot-lightweight-version"><span>EVE <wbr/>Market <wbr/>Trading <wbr/>Bot (<wbr/>Lightweight <wbr/>Version)</span></a></li><li><a href="#md:corporation-management-dashboard-custom-client-1"><span>Corporation <wbr/>Management <wbr/>Dashboard (<wbr/>Custom <wbr/>Client)</span></a></li><li><a href="#md:simple-character-lookup-direct-api"><span>Simple <wbr/>Character <wbr/>Lookup (<wbr/>Direct API)</span></a></li><li><a href="#md:direct-api-class-usage"><span>Direct API <wbr/>Class <wbr/>Usage</span></a></li><li><a href="#md:microservice-example-single-responsibility"><span>Microservice <wbr/>Example (<wbr/>Single <wbr/>Responsibility)</span></a></li></ul></li><li><a href="#md:๐งช-testing"><span>๐งช <wbr/>Testing</span></a></li><li><ul><li><a href="#md:running-tests"><span>Running <wbr/>Tests</span></a></li></ul></li><li><a href="#md:๐-working-examples"><span>๐ <wbr/>Working <wbr/>Examples</span></a></li><li><ul><li><a href="#md:try-the-examples"><span>Try the <wbr/>Examples</span></a></li><li><a href="#md:character-profile-example"><span>Character <wbr/>Profile <wbr/>Example</span></a></li><li><a href="#md:flexible-api-examples"><span>Flexible API <wbr/>Examples</span></a></li><li><a href="#md:example-files"><span>Example <wbr/>Files</span></a></li><li><a href="#md:learning-path"><span>Learning <wbr/>Path</span></a></li><li><a href="#md:testing-your-applications"><span>Testing <wbr/>Your <wbr/>Applications</span></a></li></ul></li><li><a href="#md:๐ ๏ธ-resource-management"><span>๐ ๏ธ <wbr/>Resource <wbr/>Management</span></a></li><li><ul><li><a href="#md:proper-cleanup"><span>Proper <wbr/>Cleanup</span></a></li></ul></li><li><a href="#md:๐ค-contributing"><span>๐ค <wbr/>Contributing</span></a></li><li><a href="#md:๐-license"><span>๐ <wbr/>License</span></a></li></ul></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://esi.evetech.net/ui/">ESI Documentation</a><a href="https://www.eveonline.com/">EVE Online</a><a href="https://github.com/lgriffin/ESI.ts" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@lgriffin/esi.ts" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="assets/icons.svg#icon-1"></use></svg><span>@lgriffin/esi.ts - EVE Online ESI API Client - v1.0.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|