diff --git a/credits.txt b/credits.txt index 6b7d075e5..74ba574b7 100644 --- a/credits.txt +++ b/credits.txt @@ -40,6 +40,7 @@ Contributors: Lazaren Boran Lordsworth Ed Thelleres + Tsuro Tsero Retired Testers: Varo Jan diff --git a/pom.xml b/pom.xml index 413b470c8..a575aa7a7 100644 --- a/pom.xml +++ b/pom.xml @@ -388,8 +388,8 @@ ${tests.to.skip} - ${janice} - + ${janice} + false diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EsiOwner.java b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EsiOwner.java index 011ebc6e2..913fb6bc8 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EsiOwner.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EsiOwner.java @@ -35,6 +35,7 @@ import net.troja.eve.esi.api.AssetsApi; import net.troja.eve.esi.api.BookmarksApi; import net.troja.eve.esi.api.CharacterApi; +import net.troja.eve.esi.api.ClonesApi; import net.troja.eve.esi.api.ContractsApi; import net.troja.eve.esi.api.CorporationApi; import net.troja.eve.esi.api.IndustryApi; @@ -55,6 +56,7 @@ public class EsiOwner extends AbstractOwner implements OwnerType { private final MarketApi marketApi = new MarketApi(apiClient); private final IndustryApi industryApi = new IndustryApi(apiClient); private final CharacterApi characterApi = new CharacterApi(apiClient); + private final ClonesApi clonesApi = new ClonesApi(apiClient); private final AssetsApi assetsApi = new AssetsApi(apiClient); private final WalletApi walletApi = new WalletApi(apiClient); private final UniverseApi universeApi = new UniverseApi(apiClient); @@ -185,6 +187,24 @@ private boolean isWallet() { return EsiScopes.CHARACTER_WALLET.isInScope(scopes); } } + + @Override + public boolean isClones() { + if (isCorporation()) { + return false; //Character Endpoint + } else { + return EsiScopes.CHARACTER_CLONE.isInScope(scopes); + } + } + + @Override + public boolean isImplants() { + if (isCorporation()) { + return false; //Character Endpoint + } else { + return EsiScopes.CHARACTER_IMPLANT.isInScope(scopes); + } + } @Override public boolean isAccountBalance() { @@ -406,6 +426,10 @@ public WalletApi getWalletApiAuth() { public UniverseApi getUniverseApiAuth() { return universeApi; } + + public ClonesApi getClonesApiAuth() { + return clonesApi; + } public ContractsApi getContractsApiAuth() { return contractsApi; diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveApiOwner.java b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveApiOwner.java index dd0fb5e56..5f84af8e0 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveApiOwner.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveApiOwner.java @@ -105,6 +105,16 @@ public boolean isMarketStructures() { public boolean isShip() { return false; //Not supported by the XML API } + + @Override + public boolean isClones() { + return false; //Not supported by the XML API + } + + @Override + public boolean isImplants() { + return false; //Not supported by the XML API + } @Override public boolean isOpenWindows() { diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveKitOwner.java b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveKitOwner.java index a03bbad78..be9a15941 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveKitOwner.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/EveKitOwner.java @@ -203,6 +203,16 @@ public boolean isMarketStructures() { public boolean isShip() { return isLocations() && isCharacter(); } + + @Override + public boolean isClones() { + return false; //Not supported by the EveKit, Yet + } + + @Override + public boolean isImplants() { + return false; //Not supported by the EveKit, Yet + } @Override public boolean isOpenWindows() { diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/OwnerType.java b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/OwnerType.java index 246162355..d391ae13a 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/OwnerType.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/accounts/OwnerType.java @@ -99,6 +99,8 @@ public interface OwnerType extends Comparable { //Account Mask public boolean isCharacter(); public boolean isAssetList(); + public boolean isClones(); + public boolean isImplants(); public boolean isAccountBalance(); public boolean isIndustryJobs(); public boolean isMarketOrders(); diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java b/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java index 14e1a6010..7f7e029c8 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java @@ -47,6 +47,7 @@ public class RawAsset { private static final ItemFlag MARKET_ORDER_SELL_FLAG = new ItemFlag(0, General.get().marketOrderSellFlag(), General.get().marketOrderSellFlag()); private static final ItemFlag CONTRACT_INCLUDED_FLAG = new ItemFlag(0, General.get().contractIncluded(), General.get().contractIncluded()); private static final ItemFlag CONTRACT_EXCLUDED_FLAG = new ItemFlag(0, General.get().contractExcluded(), General.get().contractExcluded()); + private static final ItemFlag PLUGGED_IMPLANT_FLAG = new ItemFlag(0, General.get().pluggedImplant(), General.get().pluggedImplant()); private Boolean isSingleton = null; private Long itemId = null; @@ -223,6 +224,21 @@ public RawAsset(CorporationAssetsResponse asset) { typeId = asset.getTypeId(); } + /** + * ESI Implant + * + * @param implantType + * @param implantLocation + */ + public RawAsset(Integer implantType, Long implantLocation) { + isSingleton = true; //Unpacked + itemId = Long.valueOf(implantType + "" + implantLocation); + itemFlag = PLUGGED_IMPLANT_FLAG; + locationId = implantLocation; + quantity = 1; //Plugged in AKA always 1 + typeId = implantType; + } + /** * ESI Ship * diff --git a/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/AboutDialog.java b/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/AboutDialog.java index 85728a5fe..d5ed1fb09 100644 --- a/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/AboutDialog.java +++ b/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/AboutDialog.java @@ -112,6 +112,7 @@ public AboutDialog(final Program program) { + " Lazaren
" + " Boran Lordsworth
" + " Ed Thelleres
" + + " Tsuro Tsero
" + "
" + "Retired Testers
" + " Varo Jan
" diff --git a/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/account/AccountTableFormat.java b/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/account/AccountTableFormat.java index cb1eafe6c..8855919e7 100644 --- a/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/account/AccountTableFormat.java +++ b/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/account/AccountTableFormat.java @@ -80,6 +80,26 @@ public Object getColumnValue(final OwnerType from) { return new YesNo(from.isCorporation()); } }, + CLONES(YesNo.class, GlazedLists.comparableComparator()) { + @Override + public String getColumnName() { + return DialoguesAccount.get().tableFormatClones(); + } + @Override + public Object getColumnValue(final OwnerType from) { + return new YesNo(from.isClones()); + } + }, + IMPLANTS(YesNo.class, GlazedLists.comparableComparator()) { + @Override + public String getColumnName() { + return DialoguesAccount.get().tableFormatImplants(); + } + @Override + public Object getColumnValue(final OwnerType from) { + return new YesNo(from.isImplants()); + } + }, ASSET_LIST(YesNo.class, GlazedLists.comparableComparator()) { @Override public String getColumnName() { diff --git a/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/update/UpdateDialog.java b/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/update/UpdateDialog.java index db4555d25..f1515810d 100644 --- a/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/update/UpdateDialog.java +++ b/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/update/UpdateDialog.java @@ -59,6 +59,7 @@ import net.nikr.eve.jeveasset.io.esi.EsiBlueprintsGetter; import net.nikr.eve.jeveasset.io.esi.EsiBookmarksGetter; import net.nikr.eve.jeveasset.io.esi.EsiContainerLogsGetter; +import net.nikr.eve.jeveasset.io.esi.EsiClonesGetter; import net.nikr.eve.jeveasset.io.esi.EsiContractItemsGetter; import net.nikr.eve.jeveasset.io.esi.EsiContractsGetter; import net.nikr.eve.jeveasset.io.esi.EsiDivisionsGetter; @@ -889,6 +890,7 @@ public void update() { updates.add(new EsiLocationsGetter(this, esiOwner)); updates.add(new EsiShipGetter(this, esiOwner, assetNextUpdate.getOrDefault(esiOwner, Settings.getNow()))); updates.add(new EsiPlanetaryInteractionGetter(this, esiOwner, assetNextUpdate.getOrDefault(esiOwner, Settings.getNow()))); + updates.add(new EsiClonesGetter(this, esiOwner, assetNextUpdate.getOrDefault(esiOwner, Settings.getNow()))); } } updates.add(new EsiFactionWarfareGetter(this)); diff --git a/src/main/java/net/nikr/eve/jeveasset/i18n/DialoguesAccount.java b/src/main/java/net/nikr/eve/jeveasset/i18n/DialoguesAccount.java index 451b055d7..498540d17 100644 --- a/src/main/java/net/nikr/eve/jeveasset/i18n/DialoguesAccount.java +++ b/src/main/java/net/nikr/eve/jeveasset/i18n/DialoguesAccount.java @@ -77,6 +77,8 @@ public DialoguesAccount(final Locale locale) { public abstract String workaroundLabel(); public abstract String workaroundCheckbox(); public abstract String scopeAssets(); + public abstract String scopeClones(); + public abstract String scopeImplants(); public abstract String scopeWallet(); public abstract String scopeBlueprints(); public abstract String scopeBookmarks(); @@ -146,6 +148,8 @@ public DialoguesAccount(final Locale locale) { public abstract String migrate(); public abstract String tableFormatName(); + public abstract String tableFormatClones(); + public abstract String tableFormatImplants(); public abstract String tableFormatCorporation(); public abstract String tableFormatAssetList(); public abstract String tableFormatAccountBalance(); diff --git a/src/main/java/net/nikr/eve/jeveasset/i18n/General.java b/src/main/java/net/nikr/eve/jeveasset/i18n/General.java index 0d4f3c089..7ff7cb246 100644 --- a/src/main/java/net/nikr/eve/jeveasset/i18n/General.java +++ b/src/main/java/net/nikr/eve/jeveasset/i18n/General.java @@ -41,6 +41,7 @@ public General(final Locale locale) { public abstract String uncaughtErrorMessage(); public abstract String error(); public abstract String contractIncluded(); + public abstract String pluggedImplant(); public abstract String contractExcluded(); public abstract String industryJobFlag(); public abstract String marketOrderSellFlag(); diff --git a/src/main/java/net/nikr/eve/jeveasset/io/esi/AbstractEsiGetter.java b/src/main/java/net/nikr/eve/jeveasset/io/esi/AbstractEsiGetter.java index 34dc4c31e..b8ac714d9 100644 --- a/src/main/java/net/nikr/eve/jeveasset/io/esi/AbstractEsiGetter.java +++ b/src/main/java/net/nikr/eve/jeveasset/io/esi/AbstractEsiGetter.java @@ -44,6 +44,7 @@ import net.troja.eve.esi.api.AssetsApi; import net.troja.eve.esi.api.BookmarksApi; import net.troja.eve.esi.api.CharacterApi; +import net.troja.eve.esi.api.ClonesApi; import net.troja.eve.esi.api.ContractsApi; import net.troja.eve.esi.api.CorporationApi; import net.troja.eve.esi.api.FactionWarfareApi; @@ -277,6 +278,10 @@ protected WalletApi getWalletApiAuth() { protected UniverseApi getUniverseApiAuth() { return owner.getUniverseApiAuth(); } + + public ClonesApi getClonesApiAuth() { + return owner.getClonesApiAuth(); + } public ContractsApi getContractsApiAuth() { return owner.getContractsApiAuth(); diff --git a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiClonesGetter.java b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiClonesGetter.java new file mode 100644 index 000000000..f8acaf692 --- /dev/null +++ b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiClonesGetter.java @@ -0,0 +1,129 @@ +/* + * Copyright 2009-2023 Contributors (see credits.txt) + * + * This file is part of jEveAssets. + * + * jEveAssets is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * jEveAssets is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with jEveAssets; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +package net.nikr.eve.jeveasset.io.esi; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; +import net.nikr.eve.jeveasset.data.api.accounts.EsiOwner; +import net.nikr.eve.jeveasset.data.api.my.MyAsset; +import net.nikr.eve.jeveasset.gui.dialogs.update.UpdateTask; +import static net.nikr.eve.jeveasset.io.esi.AbstractEsiGetter.DATASOURCE; +import static net.nikr.eve.jeveasset.io.esi.AbstractEsiGetter.DEFAULT_RETRIES; +import net.nikr.eve.jeveasset.io.shared.RawConverter; +import net.troja.eve.esi.ApiException; +import net.troja.eve.esi.ApiResponse; +import net.troja.eve.esi.model.CharacterClonesResponse; +import net.troja.eve.esi.model.CharacterLocationResponse; +import net.troja.eve.esi.model.CharacterRolesResponse.RolesEnum; +import net.troja.eve.esi.model.Clone; + + +public class EsiClonesGetter extends AbstractEsiGetter { + + public EsiClonesGetter(UpdateTask updateTask, EsiOwner owner, Date assetNextUpdate) { + super(updateTask, owner, false, assetNextUpdate, TaskType.CLONES); + } + + @Override + protected void update() throws ApiException { + if (owner.isCorporation()) { + return; //Character Endpoint + } + //Get Jump Clones + CharacterClonesResponse jumpClonesResponse = update(DEFAULT_RETRIES, new EsiHandler() { + @Override + public ApiResponse get() throws ApiException { + return getClonesApiAuth().getCharactersCharacterIdClonesWithHttpInfo((int)owner.getOwnerID(), DATASOURCE, null, null); + } + }); + //Get Active Clone + List activeClone = update(DEFAULT_RETRIES, new EsiHandler>() { + @Override + public ApiResponse> get() throws ApiException { + return getClonesApiAuth().getCharactersCharacterIdImplantsWithHttpInfo((int)owner.getOwnerID(), DATASOURCE, null, null); + } + }); + //Get Location + CharacterLocationResponse characterLocation = update(DEFAULT_RETRIES, new EsiHandler() { + @Override + public ApiResponse get() throws ApiException { + return getLocationApiAuth().getCharactersCharacterIdLocationWithHttpInfo((int)owner.getOwnerID(), DATASOURCE, null, null); + } + }); + Long activeCloneLocation = RawConverter.toLocationID(characterLocation); + + //Create assets + List implants = new ArrayList<>(); + List jumpClones = jumpClonesResponse.getJumpClones(); + + for (Clone clone : jumpClones){ + List cloneImplants = clone.getImplants(); + Long cloneLocation = clone.getLocationId(); + for (Integer implant : cloneImplants){ + MyAsset implantAsset = EsiConverter.toAssetsImplant(implant, cloneLocation, owner); + implants.add(implantAsset); + } + } + + for (Integer implant : activeClone){ + MyAsset activeCloneImplant = EsiConverter.toAssetsImplant(implant, activeCloneLocation, owner); + implants.add(activeCloneImplant); + } + + + //Clear out implants + List assets; + synchronized (owner) { + assets = new ArrayList<>(owner.getAssets()); + } + List existingImplants = assets.stream().filter(asset -> "Plugged in Implant".equals(asset.getFlag())).collect(Collectors.toList()); + if (!existingImplants.isEmpty()) { + owner.removeAssets(existingImplants); + } + + //Reload Implants + for (MyAsset implant : implants){ + owner.addAsset(implant); + } + } + + @Override + protected void setNextUpdate(Date date) { + //Use the assets update times + } + + @Override + protected boolean haveAccess() { + if (owner.isCorporation()) { + return true; //Overwrite the default, so, we don't get errors + } else { + return owner.isClones() && owner.isImplants(); + } + } + + @Override + protected RolesEnum[] getRequiredRoles() { + return null; + } + +} diff --git a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java index 30e05af30..d8b4689f4 100644 --- a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java +++ b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java @@ -59,6 +59,7 @@ import net.nikr.eve.jeveasset.io.shared.DataConverter; import net.troja.eve.esi.model.CharacterAssetsResponse; import net.troja.eve.esi.model.CharacterBlueprintsResponse; +import net.troja.eve.esi.model.CharacterClonesResponse; import net.troja.eve.esi.model.CharacterContractsItemsResponse; import net.troja.eve.esi.model.CharacterContractsResponse; import net.troja.eve.esi.model.CharacterIndustryJobsResponse; @@ -134,6 +135,10 @@ public static List toAssetsCorporation(List public static MyAsset toAssetsShip(CharacterShipResponse shipType, CharacterLocationResponse shipLocation, OwnerType owner) { return toMyAsset(new RawAsset(shipType, shipLocation), owner, new ArrayList<>()); } + + public static MyAsset toAssetsImplant(Integer implantType, Long implantLocation, OwnerType owner) { + return toMyAsset(new RawAsset(implantType, implantLocation), owner, new ArrayList<>()); + } public static MyAsset toAssetsPlanetaryInteraction(CharacterPlanetsResponse planet, PlanetPin pin, OwnerType owner) { MyAsset parent = toMyAsset(new RawAsset(planet, pin), owner, new ArrayList<>()); diff --git a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiScopes.java b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiScopes.java index 3cdb3a6f6..ea19db157 100644 --- a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiScopes.java +++ b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiScopes.java @@ -27,6 +27,8 @@ public enum EsiScopes { CHARACTER_ASSETS(SsoScopes.ESI_ASSETS_READ_ASSETS_V1, DialoguesAccount.get().scopeAssets(), ScopeType.CHARACTER), + CHARACTER_CLONE(SsoScopes.ESI_CLONES_READ_CLONES_V1, DialoguesAccount.get().scopeClones(), ScopeType.CHARACTER), + CHARACTER_IMPLANT(SsoScopes.ESI_CLONES_READ_IMPLANTS_V1, DialoguesAccount.get().scopeImplants(), ScopeType.CHARACTER), CHARACTER_WALLET(SsoScopes.ESI_WALLET_READ_CHARACTER_WALLET_V1, DialoguesAccount.get().scopeWallet(), ScopeType.CHARACTER), CHARACTER_INDUSTRY_JOBS(SsoScopes.ESI_INDUSTRY_READ_CHARACTER_JOBS_V1, DialoguesAccount.get().scopeIndustryJobs(), ScopeType.CHARACTER), CHARACTER_MARKET_ORDERS(SsoScopes.ESI_MARKETS_READ_CHARACTER_ORDERS_V1, DialoguesAccount.get().scopeMarketOrders(), ScopeType.CHARACTER), diff --git a/src/main/java/net/nikr/eve/jeveasset/io/shared/AbstractGetter.java b/src/main/java/net/nikr/eve/jeveasset/io/shared/AbstractGetter.java index 4c2bbb24d..ad0149dbb 100644 --- a/src/main/java/net/nikr/eve/jeveasset/io/shared/AbstractGetter.java +++ b/src/main/java/net/nikr/eve/jeveasset/io/shared/AbstractGetter.java @@ -56,6 +56,7 @@ protected enum TaskType { BOOKMARKS("Bookmarks"), CONTAINER_LOGS("Container Logs"), CONTRACTS("Contracts"), + CLONES("Clones"), CONTRACT_ITEMS("Contract Items"), CONTRACT_PRICES("Contract Prices"), DIVISIONS("Division Names"), diff --git a/src/main/resources/net/nikr/eve/jeveasset/i18n/DialoguesAccount.properties b/src/main/resources/net/nikr/eve/jeveasset/i18n/DialoguesAccount.properties index 149171c40..28c2404d9 100644 --- a/src/main/resources/net/nikr/eve/jeveasset/i18n/DialoguesAccount.properties +++ b/src/main/resources/net/nikr/eve/jeveasset/i18n/DialoguesAccount.properties @@ -80,6 +80,8 @@ corporation=Corporation workaroundLabel=Workaround workaroundCheckbox=Use eve.nikr.net scopeAssets=Assets +scopeClones=Clones +scopeImplants=Implants scopeWallet=Wallet scopeBlueprints=Blueprints scopeBookmarks=Bookmarks @@ -151,6 +153,8 @@ accountMigratedDoneTitle=Migration Completed tableFormatName=Name tableFormatCorporation=Corporation +tableFormatClones=Clones +tableFormatImplants=Implants tableFormatAssetList=Assets tableFormatAccountBalance=Account Balance tableFormatIndustryJobs=Industry Jobs diff --git a/src/main/resources/net/nikr/eve/jeveasset/i18n/General.properties b/src/main/resources/net/nikr/eve/jeveasset/i18n/General.properties index c57352e84..bfef9fb5f 100644 --- a/src/main/resources/net/nikr/eve/jeveasset/i18n/General.properties +++ b/src/main/resources/net/nikr/eve/jeveasset/i18n/General.properties @@ -1,5 +1,6 @@ uncaughtErrorMessage=Please email jeveassets.log to niklaskr@gmail.com (See the readme.txt for details) error=Error +pluggedImplant=Plugged in Implant contractIncluded=Contract > Sell contractExcluded=Contract > Buy industryJobFlag=Industry Job diff --git a/src/test/java/net/nikr/eve/jeveasset/io/esi/EsiScopesTest.java b/src/test/java/net/nikr/eve/jeveasset/io/esi/EsiScopesTest.java index 864a3dc43..57a1f4a25 100644 --- a/src/test/java/net/nikr/eve/jeveasset/io/esi/EsiScopesTest.java +++ b/src/test/java/net/nikr/eve/jeveasset/io/esi/EsiScopesTest.java @@ -32,7 +32,7 @@ public EsiScopesTest() { @Test public void testLocalhost() { - String s = "esi-location.read_location.v1 esi-location.read_ship_type.v1 esi-skills.read_skills.v1 esi-wallet.read_character_wallet.v1 esi-universe.read_structures.v1 esi-bookmarks.read_character_bookmarks.v1 esi-assets.read_assets.v1 esi-planets.manage_planets.v1 esi-ui.open_window.v1 esi-ui.write_waypoint.v1 esi-markets.structure_markets.v1 esi-industry.read_character_jobs.v1 esi-markets.read_character_orders.v1 esi-characters.read_blueprints.v1 esi-characters.read_corporation_roles.v1 esi-contracts.read_character_contracts.v1 esi-wallet.read_corporation_wallets.v1 esi-corporations.read_divisions.v1 esi-assets.read_corporation_assets.v1 esi-corporations.read_blueprints.v1 esi-bookmarks.read_corporation_bookmarks.v1 esi-contracts.read_corporation_contracts.v1 esi-industry.read_corporation_jobs.v1 esi-markets.read_corporation_orders.v1 esi-corporations.read_container_logs.v1 esi-industry.read_character_mining.v1 esi-industry.read_corporation_mining.v1 esi-planets.read_customs_offices.v1"; + String s = "esi-location.read_location.v1 esi-location.read_ship_type.v1 esi-skills.read_skills.v1 esi-wallet.read_character_wallet.v1 esi-clones.read_clones.v1 esi-universe.read_structures.v1 esi-bookmarks.read_character_bookmarks.v1 esi-assets.read_assets.v1 esi-planets.manage_planets.v1 esi-ui.open_window.v1 esi-ui.write_waypoint.v1 esi-markets.structure_markets.v1 esi-industry.read_character_jobs.v1 esi-markets.read_character_orders.v1 esi-characters.read_blueprints.v1 esi-characters.read_corporation_roles.v1 esi-contracts.read_character_contracts.v1 esi-clones.read_implants.v1 esi-wallet.read_corporation_wallets.v1 esi-corporations.read_divisions.v1 esi-assets.read_corporation_assets.v1 esi-corporations.read_blueprints.v1 esi-bookmarks.read_corporation_bookmarks.v1 esi-contracts.read_corporation_contracts.v1 esi-industry.read_corporation_jobs.v1 esi-markets.read_corporation_orders.v1 esi-corporations.read_container_logs.v1 esi-industry.read_character_mining.v1 esi-industry.read_corporation_mining.v1 esi-planets.read_customs_offices.v1"; for (EsiScopes scope : EsiScopes.values()) { assertTrue(scope.getScope() + " not included", s.contains(scope.getScope())); } @@ -40,7 +40,7 @@ public void testLocalhost() { @Test public void testNiKR() { - String s = "esi-location.read_location.v1 esi-location.read_ship_type.v1 esi-skills.read_skills.v1 esi-wallet.read_character_wallet.v1 esi-universe.read_structures.v1 esi-bookmarks.read_character_bookmarks.v1 esi-assets.read_assets.v1 esi-planets.manage_planets.v1 esi-ui.open_window.v1 esi-ui.write_waypoint.v1 esi-markets.structure_markets.v1 esi-industry.read_character_jobs.v1 esi-markets.read_character_orders.v1 esi-characters.read_blueprints.v1 esi-characters.read_corporation_roles.v1 esi-contracts.read_character_contracts.v1 esi-wallet.read_corporation_wallets.v1 esi-corporations.read_divisions.v1 esi-assets.read_corporation_assets.v1 esi-corporations.read_blueprints.v1 esi-bookmarks.read_corporation_bookmarks.v1 esi-contracts.read_corporation_contracts.v1 esi-industry.read_corporation_jobs.v1 esi-markets.read_corporation_orders.v1 esi-corporations.read_container_logs.v1 esi-industry.read_character_mining.v1 esi-industry.read_corporation_mining.v1 esi-planets.read_customs_offices.v1"; + String s = "esi-location.read_location.v1 esi-location.read_ship_type.v1 esi-skills.read_skills.v1 esi-wallet.read_character_wallet.v1 esi-clones.read_clones.v1 esi-universe.read_structures.v1 esi-bookmarks.read_character_bookmarks.v1 esi-assets.read_assets.v1 esi-planets.manage_planets.v1 esi-ui.open_window.v1 esi-ui.write_waypoint.v1 esi-markets.structure_markets.v1 esi-industry.read_character_jobs.v1 esi-markets.read_character_orders.v1 esi-characters.read_blueprints.v1 esi-characters.read_corporation_roles.v1 esi-contracts.read_character_contracts.v1 esi-clones.read_implants.v1 esi-wallet.read_corporation_wallets.v1 esi-corporations.read_divisions.v1 esi-assets.read_corporation_assets.v1 esi-corporations.read_blueprints.v1 esi-bookmarks.read_corporation_bookmarks.v1 esi-contracts.read_corporation_contracts.v1 esi-industry.read_corporation_jobs.v1 esi-markets.read_corporation_orders.v1 esi-corporations.read_container_logs.v1 esi-industry.read_character_mining.v1 esi-industry.read_corporation_mining.v1 esi-planets.read_customs_offices.v1"; for (EsiScopes scope : EsiScopes.values()) { assertTrue(scope.getScope() + " not included", s.contains(scope.getScope())); } diff --git a/src/test/java/net/nikr/eve/jeveasset/io/shared/ConverterTestUtil.java b/src/test/java/net/nikr/eve/jeveasset/io/shared/ConverterTestUtil.java index dd5587948..ac0d3f732 100644 --- a/src/test/java/net/nikr/eve/jeveasset/io/shared/ConverterTestUtil.java +++ b/src/test/java/net/nikr/eve/jeveasset/io/shared/ConverterTestUtil.java @@ -79,6 +79,7 @@ import net.troja.eve.esi.api.AssetsApi; import net.troja.eve.esi.api.BookmarksApi; import net.troja.eve.esi.api.CharacterApi; +import net.troja.eve.esi.api.ClonesApi; import net.troja.eve.esi.api.ContractsApi; import net.troja.eve.esi.api.CorporationApi; import net.troja.eve.esi.api.IndustryApi; @@ -627,6 +628,9 @@ private static boolean ignore(Object object, Field field, Class type) { if (type.equals(SkillsApi.class)) { return true; } + if (type.equals(ClonesApi.class)) { + return true; + } return false; }