diff --git a/README.md b/README.md
index bba1678..530ec30 100644
--- a/README.md
+++ b/README.md
@@ -93,13 +93,9 @@ So if you see anything I missed, please don't hesitate to create an issue to let
+ /v2/account
-+ /v2/account/bank
++ /v2/account/*
-+ /v2/account/inventory
-
-+ /v2/account/materials
-
-+ /v2/account/wallet
++ /v2/achievements
+ /v2/characters/<name>/core
@@ -113,20 +109,40 @@ So if you see anything I missed, please don't hesitate to create an issue to let
+ /v2/currencies
++ /v2/dungeons
+
++ /v2/finishers
+
++ /v2/gliders
+
++ /v2/guild/upgrades
+
+ /v2/items
+ /v2/itemstats
++ /v2/mailcarriers
+
++ /v2/masteries
+
+ /v2/materials
+ /v2/minis
++ /v2/outfits
+
++ /v2/pvp/heroes
+
++ /v2/raids
+
+ /v2/recipes
+ /v2/recipes/search
+ /v2/skins
++ /v2/titles
+
+ /v2/tokeninfo
+ /v2/worlds
diff --git a/comm.properties b/comm.properties
index e74e3b6..15b7009 100644
--- a/comm.properties
+++ b/comm.properties
@@ -1,4 +1,4 @@
-currentVer=0.2.1
+currentVer=0.4.1
groupID='me.xhsun.gw2wrapper'
siteUrl='https://github.com/xhsun/gw2wrapper'
gitUrl='https://github.com/xhsun/gw2wrapper.git'
\ No newline at end of file
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java b/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
index 884531c..3bca50b 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
@@ -3,10 +3,17 @@
import me.xhsun.guildwars2wrapper.error.GuildWars2Exception;
import me.xhsun.guildwars2wrapper.model.*;
import me.xhsun.guildwars2wrapper.model.account.*;
+import me.xhsun.guildwars2wrapper.model.achievements.Achievement;
import me.xhsun.guildwars2wrapper.model.character.CharacterInventory;
import me.xhsun.guildwars2wrapper.model.character.Core;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
+import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
+import me.xhsun.guildwars2wrapper.model.pvp.Hero;
+import me.xhsun.guildwars2wrapper.model.unlockable.Finisher;
+import me.xhsun.guildwars2wrapper.model.unlockable.Glider;
+import me.xhsun.guildwars2wrapper.model.unlockable.MailCarrier;
+import me.xhsun.guildwars2wrapper.model.unlockable.Outfit;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@@ -25,6 +32,8 @@ public class AsynchronousRequest extends Request {
super(gw2API);
}
+ //Token info
+
/**
* For more info on TokenInfo API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -40,6 +49,7 @@ public void getAPIInfo(String API, Callback callback) throws GuildWar
gw2API.getAPIInfo(API).enqueue(callback);
}
+ //Accounts
/**
* For more info on Account API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -55,6 +65,21 @@ public void getAccount(String API, Callback callback) throws GuildWars2
gw2API.getAccount(API).enqueue(callback);
}
+ /**
+ * For more info on Account API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see AchievementProgression Account achievement info
+ */
+ public void getAchievementProgression(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getAchievementProgression(API).enqueue(callback);
+ }
+
/**
* For more info on Bank API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -70,6 +95,93 @@ public void getBank(String API, Callback> callback) throws GuildWars2
gw2API.getBank(API).enqueue(callback);
}
+ /**
+ * For more info on Dungeon progression API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getDailyDungeonProgression(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getDailyDungeonProgression(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account dyes API go here
+ * Get list of unlocked dyes ids linked to given API key
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Color color info
+ */
+ public void getUnlockedDyes(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedDyes(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account finishers API go here
+ * Get list of unlocked finishers linked to given API key
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see UnlockedFinisher unlocked finisher info
+ */
+ public void getUnlockedFinishers(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedFinishers(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account gliders API go here
+ * Get list of unlocked glider id(s) linked to given API key
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getUnlockedGliders(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedGliders(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account cats API go here
+ * Get list of unlocked cats linked to given API key
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Cat cat info
+ */
+ public void getUnlockedCats(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedCats(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account nodes API go here
+ * Get list of unlocked glider id(s) linked to given API key
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getUnlockedHomeNodes(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedHomeNodes(API).enqueue(callback);
+ }
+
/**
* For more info on Shared Inventory API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -86,32 +198,32 @@ public void getSharedInventory(String API, Callback> callb
}
/**
- * For more info on Wallet API go here
+ * For more info on account mail carrier API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param API API key
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception invalid API key
* @throws NullPointerException if given {@link Callback} is empty
- * @see Wallet wallet info
*/
- public void getWallet(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ public void getUnlockedMailCarriers(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ParamType.API, API));
- gw2API.getWallet(API).enqueue(callback);
+ gw2API.getUnlockedMailCarriers(API).enqueue(callback);
}
/**
- * For more info on Account/Skins API go here
- * Get list of unlocked skin ids linked to given API key
+ * For more info on account masteries API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param API API key
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception invalid API key
* @throws NullPointerException if given {@link Callback} is empty
+ * @see UnlockedMastery unlocked mastery info
*/
- public void getUnlockedSkins(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ public void getUnlockedMasteries(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ParamType.API, API));
- gw2API.getUnlockedSkins(API).enqueue(callback);
+ gw2API.getUnlockedMasteries(API).enqueue(callback);
}
/**
@@ -129,6 +241,152 @@ public void getMaterialStorage(String API, Callback> callback) th
gw2API.getMaterialBank(API).enqueue(callback);
}
+ /**
+ * For more info on account minis API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Mini mini info
+ */
+ public void getUnlockedMinis(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedMinis(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on account outfits API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getUnlockedOutfits(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedOutfits(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on account pvp heroes API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getUnlockedPvpHeroes(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedPvpHeroes(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on account raid API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getWeeklyRaidProgression(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getWeeklyRaidProgression(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on account recipes API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Recipe recipe info
+ */
+ public void getUnlockedRecipes(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedRecipes(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account/Skins API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Skin skin info
+ */
+ public void getUnlockedSkins(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedSkins(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Account titles API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getUnlockedTitles(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getUnlockedTitles(API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Wallet API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param API API key
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Wallet wallet info
+ */
+ public void getWallet(String API, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ gw2API.getWallet(API).enqueue(callback);
+ }
+
+ //Achievements
+
+ /**
+ * For more info on achievement API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Achievement achievement info
+ */
+ public void getAllAchievementID(Callback> callback) throws NullPointerException {
+ gw2API.getAllAchievementIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on achievement API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of achievement id(s)
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Achievement achievement info
+ */
+ public void getAchievementInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getAchievementInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Characters
/**
* For more info on Character API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -175,6 +433,36 @@ public void getCharacterInventory(String API, String name, Callbackhere
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Color color info
+ */
+ public void getAllColorID(Callback> callback) throws NullPointerException {
+ gw2API.getAllColorIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on Color API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of color id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Color color info
+ */
+ public void getColorInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getColorInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //TP
/**
* For more info on Listing Price API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -199,7 +487,7 @@ public void getListing(String API, Transaction.Time time, Transaction.Type type,
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
*/
- public void getAllListedItemID(Callback> callback) throws NullPointerException {
+ public void getAllListedItemID(Callback> callback) throws NullPointerException {
gw2API.getAllPrices().enqueue(callback);
}
@@ -213,11 +501,25 @@ public void getAllListedItemID(Callback> callback) throws NullPointer
* @throws NullPointerException if given {@link Callback} is empty
* @see Prices listing item price info
*/
- public void getPrices(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public void getPrices(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
gw2API.getPrices(processIds(ids)).enqueue(callback);
}
+ //Currencies
+
+ /**
+ * For more info on Currency API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Currency currency info
+ */
+ public void getAllCurrencyID(Callback> callback) throws NullPointerException {
+ gw2API.getAllCurrencies().enqueue(callback);
+ }
+
/**
* For more info on Currency API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -228,102 +530,139 @@ public void getPrices(long[] ids, Callback> callback) throws GuildW
* @throws NullPointerException if given {@link Callback} is empty
* @see Currency currency info
*/
- public void getCurrencyInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public void getCurrencyInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
gw2API.getCurrencyInfo(processIds(ids)).enqueue(callback);
}
+ //Dungeons
+
/**
- * For more info on Currency API go here
+ * For more info on Dungeons API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see Currency currency info
+ * @see Dungeon dungeon info
*/
- public void getAllCurrencyID(Callback> callback) throws NullPointerException {
- gw2API.getAllCurrencies().enqueue(callback);
+ public void getAllDungeonName(Callback> callback) throws NullPointerException {
+ gw2API.getAllDungeonName().enqueue(callback);
}
/**
- * For more info on World API go here
+ * For more info on Dungeons API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
- * @param ids list of world id
+ * @param ids list of dungeon id
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception empty ID list
* @throws NullPointerException if given {@link Callback} is empty
- * @see World world info
+ * @see Dungeon dungeon info
*/
- public void getWorldInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
- gw2API.getWorldsInfo(processIds(ids)).enqueue(callback);
+ public void getDungeonInfo(String[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getDungeonInfo(processIds(ids)).enqueue(callback);
}
+ //Finishers
+
/**
- * For more info on World API go here
+ * For more info on Finishers API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see World world info
+ * @see Finisher finisher info
*/
- public void getAllWorldID(Callback> callback) throws NullPointerException {
- gw2API.getAllWorldsIDs().enqueue(callback);
+ public void getAllFinisherID(Callback> callback) throws NullPointerException {
+ gw2API.getAllFinisherIDs().enqueue(callback);
}
/**
- * For more info on Material Category API go here
+ * For more info on Finishers API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
- * @param ids list of category id
+ * @param ids list of finisher id
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception empty ID list
* @throws NullPointerException if given {@link Callback} is empty
- * @see MaterialCategory material category info
+ * @see Finisher finisher info
*/
- public void getMaterialCategoryInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
- gw2API.getMaterialBankInfo(processIds(ids)).enqueue(callback);
+ public void getFinisherInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getFinisherInfo(processIds(ids)).enqueue(callback);
}
+ //Gliders
+
/**
- * For more info on Material Category API go here
+ * For more info on gliders API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see MaterialCategory material category info
+ * @see Glider glider info
*/
- public void getAllMaterialCategoryID(Callback> callback) throws NullPointerException {
- gw2API.getAllMaterialBankIDs().enqueue(callback);
+ public void getAllGliderID(Callback> callback) throws NullPointerException {
+ gw2API.getAllGliderIDs().enqueue(callback);
}
/**
- * For more info on Skin API go here
+ * For more info on gliders API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
- * @param ids list of skin id
+ * @param ids list of glider id
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception empty ID list
* @throws NullPointerException if given {@link Callback} is empty
- * @see Skin skin info
+ * @see Glider glider info
*/
- public void getSkinInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
- gw2API.getSkinInfo(processIds(ids)).enqueue(callback);
+ public void getGliderInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getGliderInfo(processIds(ids)).enqueue(callback);
}
+ //Guild Upgrades
+
/**
- * For more info on Skin API go here
+ * For more info on guild upgrades API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see Skin skin info
+ * @see Upgrade guild upgrade info
*/
- public void getAllSkinID(Callback> callback) throws NullPointerException {
- gw2API.getAllSkinIDs().enqueue(callback);
+ public void getGuildUpgradeID(Callback> callback) throws NullPointerException {
+ gw2API.getAllGuildUpgradeIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on guild upgrades API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of guild upgrade id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Upgrade guild upgrade info
+ */
+ public void getGuildUpgradeInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getGuildUpgradeInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Items
+
+ /**
+ * For more info on Item API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Item item info
+ */
+ public void getAllItemID(Callback> callback) throws NullPointerException {
+ gw2API.getAllItemIDs().enqueue(callback);
}
/**
@@ -336,21 +675,23 @@ public void getAllSkinID(Callback> callback) throws NullPointerExcept
* @throws NullPointerException if given {@link Callback} is empty
* @see Item item info
*/
- public void getItemInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public void getItemInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
gw2API.getItemInfo(processIds(ids)).enqueue(callback);
}
+ //Item Stats
+
/**
- * For more info on Item API go here
+ * For more info on Itemstat API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see Item item info
+ * @see ItemStats itemstat info
*/
- public void getAllItemID(Callback> callback) throws NullPointerException {
- gw2API.getAllItemIDs().enqueue(callback);
+ public void getAllItemStatID(Callback> callback) throws NullPointerException {
+ gw2API.getAllItemStatIDs().enqueue(callback);
}
/**
@@ -363,65 +704,216 @@ public void getAllItemID(Callback> callback) throws NullPointerExcept
* @throws NullPointerException if given {@link Callback} is empty
* @see ItemStats itemstat info
*/
- public void getItemStatInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public void getItemStatInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
gw2API.getItemStatInfo(processIds(ids)).enqueue(callback);
}
+ //Mail Carriers
+
/**
- * For more info on Itemstat API go here
+ * For more info on mail carriers API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see ItemStats itemstat info
+ * @see MailCarrier mail carrier info
*/
- public void getAllItemStatID(Callback> callback) throws NullPointerException {
- gw2API.getAllItemStatIDs().enqueue(callback);
+ public void getAllMailCarrierID(Callback> callback) throws NullPointerException {
+ gw2API.getAllMailCarrierIDs().enqueue(callback);
}
/**
- * For more info on Color API go here
+ * For more info on mail carriers API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
- * @param ids list of color id
+ * @param ids list of mail carrier id
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception empty ID list
* @throws NullPointerException if given {@link Callback} is empty
- * @see Color color info
+ * @see MailCarrier mail carrier info
*/
- public void getColorInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
- gw2API.getColorInfo(processIds(ids)).enqueue(callback);
+ public void getMailCarrierInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getMailCarrierInfo(processIds(ids)).enqueue(callback);
}
+ //Masteries
+
/**
- * For more info on Color API go here
+ * or more info on masteries API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see Color color info
+ * @see Mastery mastery info
*/
- public void getAllColorID(Callback> callback) throws NullPointerException {
- gw2API.getAllColorIDs().enqueue(callback);
+ public void getAllMasteryID(Callback> callback) throws NullPointerException {
+ gw2API.getAllMasteryIDs().enqueue(callback);
}
/**
- * For more info on Recipes API go here
+ * or more info on masteries API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
- * @param ids list of recipe id
+ * @param ids list of mastery id
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception empty ID list
* @throws NullPointerException if given {@link Callback} is empty
- * @see Recipe recipe info
+ * @see Mastery mastery info
*/
- public void getRecipeInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
- gw2API.getRecipeInfo(processIds(ids)).enqueue(callback);
+ public void getMasteryInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getMasteryInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Material Categories
+
+ /**
+ * For more info on Material Category API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see MaterialCategory material category info
+ */
+ public void getAllMaterialCategoryID(Callback> callback) throws NullPointerException {
+ gw2API.getAllMaterialBankIDs().enqueue(callback);
}
+ /**
+ * For more info on Material Category API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of category id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see MaterialCategory material category info
+ */
+ public void getMaterialCategoryInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getMaterialBankInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Minis
+
+ /**
+ * For more info on Mini API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Mini mini info
+ */
+ public void getAllMiniID(Callback> callback) throws NullPointerException {
+ gw2API.getAllMiniIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on Mini API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of mini id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Mini mini info
+ */
+ public void getMiniInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getMiniInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Outfits
+
+ /**
+ * For more info on Outfits API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Outfit outfit info
+ */
+ public void getAllOutfitID(Callback> callback) throws NullPointerException {
+ gw2API.getAllOutfitIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on Outfits API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of outfit id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Outfit outfit info
+ */
+ public void getOutfitInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getOutfitInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //PvP Heroes
+
+ /**
+ * For more info on pvp heroes API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Hero pvp hero info
+ */
+ public void getAllPvPHeroID(Callback> callback) throws NullPointerException {
+ gw2API.getAllPvPHeroIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on pvp heroes API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of pvp hero id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Hero pvp hero info
+ */
+ public void getPvPHeroInfo(String[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getPvPHeroInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Raids
+
+ /**
+ * For more info on raids API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Raid raid info
+ */
+ public void getAllRaidID(Callback> callback) throws NullPointerException {
+ gw2API.getAllRaidIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on raids API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of raid id(s)
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Raid raid info
+ */
+ public void getRaidInfo(String[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getRaidInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Recipes
+
/**
* For more info on Recipes API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -430,10 +922,27 @@ public void getRecipeInfo(long[] ids, Callback> callback) throws Gu
* @throws NullPointerException if given {@link Callback} is empty
* @see Recipe recipe info
*/
- public void getAllRecipeID(Callback> callback) throws NullPointerException {
+ public void getAllRecipeID(Callback> callback) throws NullPointerException {
gw2API.getAllRecipeIDs().enqueue(callback);
}
+ /**
+ * For more info on Recipes API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of recipe id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Recipe recipe info
+ */
+ public void getRecipeInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getRecipeInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Recipes Search
+
/**
* For more info on Recipes search API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -442,35 +951,95 @@ public void getAllRecipeID(Callback> callback) throws NullPointerExce
* @throws NullPointerException if given {@link Callback} is empty
* @see Recipe recipe info
*/
- public void searchRecipes(boolean isInput, long id, Callback> callback) throws NullPointerException {
- if (isInput) gw2API.searchInputRecipes(Long.toString(id)).enqueue(callback);
- else gw2API.searchOutputRecipes(Long.toString(id)).enqueue(callback);
+ public void searchRecipes(boolean isInput, int id, Callback> callback) throws NullPointerException {
+ if (isInput) gw2API.searchInputRecipes(Integer.toString(id)).enqueue(callback);
+ else gw2API.searchOutputRecipes(Integer.toString(id)).enqueue(callback);
}
+ //Skins
+
/**
- * For more info on Mini API go here
+ * For more info on Skin API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
- * @param ids list of mini id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Skin skin info
+ */
+ public void getAllSkinID(Callback> callback) throws NullPointerException {
+ gw2API.getAllSkinIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on Skin API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of skin id
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception empty ID list
* @throws NullPointerException if given {@link Callback} is empty
- * @see Mini mini info
+ * @see Skin skin info
*/
- public void getMiniInfo(long[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
- isParamValid(new ParamChecker(ParamType.ID, ids));
- gw2API.getMiniInfo(processIds(ids)).enqueue(callback);
+ public void getSkinInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getSkinInfo(processIds(ids)).enqueue(callback);
}
+ //Titles
+
/**
- * For more info on Mini API go here
+ * For more info on titles API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
*
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws NullPointerException if given {@link Callback} is empty
- * @see Mini mini info
+ * @see Title title info
*/
- public void getAllMiniID(Callback> callback) throws NullPointerException {
- gw2API.getAllMiniIDs().enqueue(callback);
+ public void getAllTitleID(Callback> callback) throws NullPointerException {
+ gw2API.getAllTitleIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on titles API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of title id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Title title info
+ */
+ public void getTitleInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getTitleInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Worlds
+
+ /**
+ * For more info on World API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see World world info
+ */
+ public void getAllWorldID(Callback> callback) throws NullPointerException {
+ gw2API.getAllWorldsIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on World API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param ids list of world id
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception empty ID list
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see World world info
+ */
+ public void getWorldInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getWorldsInfo(processIds(ids)).enqueue(callback);
}
}
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java b/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java
index 92d2208..ae7b05c 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java
@@ -13,7 +13,8 @@
* This class provides two ways user can get and process data from the server:
* 1) use methods provided by {@link SynchronousRequest} to get data synchronously
* 2) use methods provided by {@link AsynchronousRequest} to get/process data asynchronously
- *
+ * TODO chatLinkToItemID
+ * TODO language selection, default english
* @author xhsun
* @since 2017-02-06
*/
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java b/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java
index bc68e77..767ab7f 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java
@@ -2,10 +2,17 @@
import me.xhsun.guildwars2wrapper.model.*;
import me.xhsun.guildwars2wrapper.model.account.*;
+import me.xhsun.guildwars2wrapper.model.achievements.Achievement;
import me.xhsun.guildwars2wrapper.model.character.CharacterInventory;
import me.xhsun.guildwars2wrapper.model.character.Core;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
+import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
+import me.xhsun.guildwars2wrapper.model.pvp.Hero;
+import me.xhsun.guildwars2wrapper.model.unlockable.Finisher;
+import me.xhsun.guildwars2wrapper.model.unlockable.Glider;
+import me.xhsun.guildwars2wrapper.model.unlockable.MailCarrier;
+import me.xhsun.guildwars2wrapper.model.unlockable.Outfit;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
@@ -20,25 +27,81 @@
* @since 2017-02-07
*/
interface GuildWars2API {
+ //token info
+ @GET("/v2/tokeninfo")
+ Call getAPIInfo(@Query("access_token") String token);
+
//accounts
@GET("/v2/account")
Call getAccount(@Query("access_token") String token);
+ @GET("/v2/account/achievements")
+ Call> getAchievementProgression(@Query("access_token") String token);
+
@GET("/v2/account/bank")
Call> getBank(@Query("access_token") String token);
+ @GET("/v2/account/dungeons")
+ Call> getDailyDungeonProgression(@Query("access_token") String token);
+
+ @GET("/v2/account/dyes")
+ Call> getUnlockedDyes(@Query("access_token") String token);
+
+ @GET("/v2/account/finishers")
+ Call> getUnlockedFinishers(@Query("access_token") String token);
+
+ @GET("/v2/account/gliders")
+ Call> getUnlockedGliders(@Query("access_token") String token);
+
+ @GET("/v2/account/home/cats")
+ Call> getUnlockedCats(@Query("access_token") String token);
+
+ @GET("/v2/account/home/nodes")
+ Call> getUnlockedHomeNodes(@Query("access_token") String token);
+
@GET("/v2/account/inventory")
Call> getSharedInventory(@Query("access_token") String token);
- @GET("/v2/account/wallet")
- Call> getWallet(@Query("access_token") String token);
+ @GET("/v2/account/mailcarriers")
+ Call> getUnlockedMailCarriers(@Query("access_token") String token);
- @GET("/v2/account/skins")
- Call> getUnlockedSkins(@Query("access_token") String token);
+ @GET("/v2/account/masteries")
+ Call> getUnlockedMasteries(@Query("access_token") String token);
@GET("/v2/account/materials")
Call> getMaterialBank(@Query("access_token") String token);
+ @GET("/v2/account/minis")
+ Call> getUnlockedMinis(@Query("access_token") String token);
+
+ @GET("/v2/account/outfits")
+ Call> getUnlockedOutfits(@Query("access_token") String token);
+
+ @GET("/v2/account/pvp/heroes")
+ Call> getUnlockedPvpHeroes(@Query("access_token") String token);
+
+ @GET("/v2/account/raids")
+ Call> getWeeklyRaidProgression(@Query("access_token") String token);
+
+ @GET("/v2/account/recipes")
+ Call> getUnlockedRecipes(@Query("access_token") String token);
+
+ @GET("/v2/account/skins")
+ Call> getUnlockedSkins(@Query("access_token") String token);
+
+ @GET("/v2/account/titles")
+ Call> getUnlockedTitles(@Query("access_token") String token);
+
+ @GET("/v2/account/wallet")
+ Call> getWallet(@Query("access_token") String token);
+
+ //achievements
+ @GET("/v2/achievements")
+ Call> getAllAchievementIDs();
+
+ @GET("/v2/achievements")
+ Call> getAchievementInfo(@Query("ids") String ids);
+
//characters
@GET("/v2/characters")
Call> getAllCharacterName(@Query("access_token") String token);
@@ -49,87 +112,153 @@ interface GuildWars2API {
@GET("/v2/characters/{name}/inventory")
Call getCharacterInventory(@Path("name") String name, @Query("access_token") String token);
+ //colors
+ @GET("/v2/colors")
+ Call> getAllColorIDs();
+
+ @GET("/v2/colors")
+ Call> getColorInfo(@Query("ids") String ids);
+
//TP
@GET("/v2/commerce/transactions/{time}/{type}")
Call> getListing(@Path("time") String time, @Path("type") String type, @Query("access_token") String token);
@GET("/v2/commerce/prices")
- Call> getAllPrices();
+ Call> getAllPrices();
@GET("/v2/commerce/prices")
Call> getPrices(@Query("ids") String ids);
- //other
- @GET("/v2/tokeninfo")
- Call getAPIInfo(@Query("access_token") String token);
-
//currencies
@GET("/v2/currencies")
- Call> getAllCurrencies();
+ Call> getAllCurrencies();
@GET("/v2/currencies")
Call> getCurrencyInfo(@Query("ids") String ids);
- //worlds
- @GET("/v2/worlds")
- Call> getAllWorldsIDs();
+ //dungeons
+ @GET("/v2/dungeons")
+ Call> getAllDungeonName();
- @GET("/v2/worlds")
- Call> getWorldsInfo(@Query("ids") String ids);
+ @GET("/v2/dungeons")
+ Call> getDungeonInfo(@Query("ids") String ids);
- //material categories
- @GET("/v2/materials")
- Call> getAllMaterialBankIDs();
+ //Finishers
+ @GET("/v2/finishers")
+ Call> getAllFinisherIDs();
- @GET("/v2/materials")
- Call> getMaterialBankInfo(@Query("ids") String ids);
+ @GET("/v2/finishers")
+ Call> getFinisherInfo(@Query("ids") String ids);
- //skins
- @GET("/v2/skins")
- Call> getAllSkinIDs();
+ //Gliders
+ @GET("/v2/gliders")
+ Call> getAllGliderIDs();
- @GET("/v2/skins")
- Call> getSkinInfo(@Query("ids") String ids);
+ @GET("/v2/gliders")
+ Call> getGliderInfo(@Query("ids") String ids);
+
+ //Guild Upgrades
+ @GET("/v2/guild/upgrades")
+ Call> getAllGuildUpgradeIDs();
+
+ @GET("/v2/guild/upgrades")
+ Call> getGuildUpgradeInfo(@Query("ids") String ids);
//items
@GET("/v2/items")
- Call> getAllItemIDs();
+ Call> getAllItemIDs();
@GET("/v2/items")
Call> getItemInfo(@Query("ids") String ids);
//item stat
@GET("/v2/itemstats")
- Call> getAllItemStatIDs();
+ Call> getAllItemStatIDs();
@GET("/v2/itemstats")
Call> getItemStatInfo(@Query("ids") String ids);
- //colors
- @GET("/v2/colors")
- Call> getAllColorIDs();
+ //mail carriers
+ @GET("/v2/mailcarriers")
+ Call> getAllMailCarrierIDs();
- @GET("/v2/colors")
- Call> getColorInfo(@Query("ids") String ids);
+ @GET("/v2/mailcarriers")
+ Call> getMailCarrierInfo(@Query("ids") String ids);
+
+ //masteries
+ @GET("/v2/masteries")
+ Call> getAllMasteryIDs();
+
+ @GET("/v2/masteries")
+ Call> getMasteryInfo(@Query("ids") String ids);
+
+ //material categories
+ @GET("/v2/materials")
+ Call> getAllMaterialBankIDs();
+
+ @GET("/v2/materials")
+ Call> getMaterialBankInfo(@Query("ids") String ids);
+
+ //minis
+ @GET("/v2/minis")
+ Call> getAllMiniIDs();
+
+ @GET("/v2/minis")
+ Call> getMiniInfo(@Query("ids") String ids);
+
+ //Outfits
+ @GET("/v2/outfits")
+ Call> getAllOutfitIDs();
+
+ @GET("/v2/outfits")
+ Call> getOutfitInfo(@Query("ids") String ids);
+
+ //PvP Heroes
+ @GET("/v2/pvp/heroes")
+ Call> getAllPvPHeroIDs();
+
+ @GET("/v2/pvp/heroes")
+ Call> getPvPHeroInfo(@Query("ids") String ids);
+
+ //Raids
+ @GET("/v2/raids")
+ Call> getAllRaidIDs();
+
+ @GET("/v2/raids")
+ Call> getRaidInfo(@Query("ids") String ids);
//recipes
@GET("/v2/recipes")
- Call> getAllRecipeIDs();
+ Call> getAllRecipeIDs();
@GET("/v2/recipes")
Call> getRecipeInfo(@Query("ids") String ids);
//recipes search
@GET("/v2/recipes/search")
- Call> searchInputRecipes(@Query("input") String id);
+ Call> searchInputRecipes(@Query("input") String id);
@GET("/v2/recipes/search")
- Call> searchOutputRecipes(@Query("output") String id);
+ Call> searchOutputRecipes(@Query("output") String id);
- //minis
- @GET("/v2/minis")
- Call> getAllMiniIDs();
+ //skins
+ @GET("/v2/skins")
+ Call> getAllSkinIDs();
- @GET("/v2/minis")
- Call> getMiniInfo(@Query("ids") String ids);
+ @GET("/v2/skins")
+ Call> getSkinInfo(@Query("ids") String ids);
+
+ //Titles
+ @GET("/v2/titles")
+ Call> getAllTitleIDs();
+
+ @GET("/v2/titles")
+ Call> getTitleInfo(@Query("ids") String ids);
+
+ //worlds
+ @GET("/v2/worlds")
+ Call> getAllWorldsIDs();
+
+ @GET("/v2/worlds")
+ Call> getWorldsInfo(@Query("ids") String ids);
}
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/Request.java b/src/main/java/me/xhsun/guildwars2wrapper/Request.java
index 82a65ed..eaf77be 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/Request.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/Request.java
@@ -23,9 +23,15 @@ abstract class Request {
}
//convert list of ids to comma separated list
- String processIds(long[] list) {
+ String processIds(int[] list) {
StringBuilder ids = new StringBuilder();
- for (long id : list) ids.append(id).append(",");
+ for (int id : list) ids.append(id).append(",");
+ return ids.toString().trim().substring(0, ids.length() - 1);
+ }
+
+ String processIds(String[] list) {
+ StringBuilder ids = new StringBuilder();
+ for (String id : list) ids.append(id).append(",");
return ids.toString().trim().substring(0, ids.length() - 1);
}
@@ -81,8 +87,15 @@ void isParamValid(ParamChecker... items) throws GuildWars2Exception {
}
}
} else {
- if (c.ids == null || c.ids.length == 0)
- throw new GuildWars2Exception(ErrorCode.ID, "List of id cannot be empty");
+ switch (c.type) {
+ case ID:
+ if (c.ids == null || c.ids.length == 0)
+ throw new GuildWars2Exception(ErrorCode.ID, "List of id cannot be empty");
+ break;
+ case STR_ID:
+ if (c.str_id == null || c.str_id.length == 0)
+ throw new GuildWars2Exception(ErrorCode.ID, "List of id cannot be empty");
+ }
}
}
@@ -92,18 +105,24 @@ void isParamValid(ParamChecker... items) throws GuildWars2Exception {
class ParamChecker {
ParamType type;
String value;
- long[] ids;
+ int[] ids;
+ String[] str_id;
ParamChecker(ParamType t, String s) {
type = t;
value = s;
}
- ParamChecker(ParamType t, long[] i) {
- type = t;
+ ParamChecker(int[] i) {
+ type = ParamType.ID;
ids = i;
}
+
+ ParamChecker(String[] i) {
+ type = ParamType.STR_ID;
+ str_id = i;
+ }
}
- enum ParamType {API, CHAR, ID}
+ enum ParamType {API, CHAR, ID, STR_ID}
}
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java b/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
index 19baed3..b5a3179 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
@@ -4,10 +4,17 @@
import me.xhsun.guildwars2wrapper.error.GuildWars2Exception;
import me.xhsun.guildwars2wrapper.model.*;
import me.xhsun.guildwars2wrapper.model.account.*;
+import me.xhsun.guildwars2wrapper.model.achievements.Achievement;
import me.xhsun.guildwars2wrapper.model.character.CharacterInventory;
import me.xhsun.guildwars2wrapper.model.character.Core;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
+import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
+import me.xhsun.guildwars2wrapper.model.pvp.Hero;
+import me.xhsun.guildwars2wrapper.model.unlockable.Finisher;
+import me.xhsun.guildwars2wrapper.model.unlockable.Glider;
+import me.xhsun.guildwars2wrapper.model.unlockable.MailCarrier;
+import me.xhsun.guildwars2wrapper.model.unlockable.Outfit;
import retrofit2.Response;
import java.io.IOException;
@@ -21,11 +28,11 @@
*/
public class SynchronousRequest extends Request {
-
SynchronousRequest(GuildWars2API gw2API) {
super(gw2API);
}
+ //Token info
/**
* For more info on TokenInfo API go here
* Get detailed info related to this API key from server
@@ -46,6 +53,7 @@ public TokenInfo getAPIInfo(String API) throws GuildWars2Exception {
}
}
+ //Accounts
/**
* For more info on Account API go here
* Get detailed info for account link to given API key
@@ -66,6 +74,26 @@ public Account getAccount(String API) throws GuildWars2Exception {
}
}
+ /**
+ * For more info on Account API go here
+ * Get an account's progress towards all their achievements.
+ *
+ * @param API API key
+ * @return list of account achievement info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see AchievementProgression account achievement info
+ */
+ public List getAchievementProgression(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ try {
+ Response> response = gw2API.getAchievementProgression(API).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
/**
* For more info on Bank API go here
* Get detailed info for bank linked to given API key
@@ -87,18 +115,16 @@ public List getBank(String API) throws GuildWars2Exception {
}
/**
- * For more info on Shared Inventory API go here
- * Get detailed info for shared inventory linked to given API key
+ * For more info on Dungeon progression API go here
*
* @param API API key
- * @return share inventory info
+ * @return an array of strings representing dungeon path names completed since daily dungeon reset
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see SharedInventory shared inventory info
*/
- public List getSharedInventory(String API) throws GuildWars2Exception {
+ public List getDailyDungeonProgression(String API) throws GuildWars2Exception {
isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getSharedInventory(API).execute();
+ Response> response = gw2API.getDailyDungeonProgression(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -107,18 +133,18 @@ public List getSharedInventory(String API) throws GuildWars2Exc
}
/**
- * For more info on Wallet API go here
- * Get detailed info for wallet linked to given API key
+ * For more info on Account dyes API go here
+ * Get list of unlocked dyes ids linked to given API key
*
* @param API API key
- * @return wallet info
+ * @return list of color ids
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Wallet wallet info
+ * @see Color
*/
- public List getWallet(String API) throws GuildWars2Exception {
+ public List getUnlockedDyes(String API) throws GuildWars2Exception {
isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getWallet(API).execute();
+ Response> response = gw2API.getUnlockedDyes(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -127,17 +153,18 @@ public List getWallet(String API) throws GuildWars2Exception {
}
/**
- * For more info on Account/Skins API go here
- * Get list of unlocked skin ids linked to given API key
+ * For more info on Account finishers API go here
+ * Get list of unlocked finishers linked to given API key
*
* @param API API key
- * @return list of ids
+ * @return list of unlocked finisher info
* @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see UnlockedFinisher unlocked finisher info
*/
- public List getUnlockedSkins(String API) throws GuildWars2Exception {
+ public List getUnlockedFinishers(String API) throws GuildWars2Exception {
isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getUnlockedSkins(API).execute();
+ Response> response = gw2API.getUnlockedFinishers(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -146,18 +173,17 @@ public List getUnlockedSkins(String API) throws GuildWars2Exception {
}
/**
- * For more info on Material Storage API go here
- * Get detailed info for material storage linked to given API key
+ * For more info on Account gliders API go here
+ * Get list of unlocked glider id(s) linked to given API key
*
* @param API API key
- * @return material storage info
+ * @return list of gliders id
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Material material storage info
*/
- public List getMaterialStorage(String API) throws GuildWars2Exception {
+ public List getUnlockedGliders(String API) throws GuildWars2Exception {
isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getMaterialBank(API).execute();
+ Response> response = gw2API.getUnlockedGliders(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -166,17 +192,18 @@ public List getMaterialStorage(String API) throws GuildWars2Exception
}
/**
- * For more info on Character API go here
- * Get all character names linked to given API key
+ * For more info on Account cats API go here
+ * Get list of unlocked cats linked to given API key
*
* @param API API key
- * @return list of character name
+ * @return list of cats
* @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Cat cat info
*/
- public List getAllCharacterName(String API) throws GuildWars2Exception {
+ public List getUnlockedCats(String API) throws GuildWars2Exception {
isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getAllCharacterName(API).execute();
+ Response> response = gw2API.getUnlockedCats(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -185,41 +212,37 @@ public List getAllCharacterName(String API) throws GuildWars2Exception {
}
/**
- * For more info on Character Core API go here
- * Get character information for the given character name that is linked to given API key
+ * For more info on Account nodes API go here
+ * Get list of unlocked home nodes linked to given API key
*
- * @param API API key
- * @param name name of character
- * @return character detail
+ * @param API API key
+ * @return list of strings
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Core character info
*/
- public Core getCharacterInformation(String API, String name) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ public List getUnlockedHomeNodes(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response response = gw2API.getCharacterCore(name, API).execute();
+ Response> response = gw2API.getUnlockedHomeNodes(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
}
-
}
/**
- * For more info on Character Inventory API go here
- * Get inventory info for the given character that is linked to given API key
+ * For more info on Shared Inventory API go here
+ * Get detailed info for shared inventory linked to given API key
*
- * @param API API key
- * @param name name of character to get inventory info
- * @return character inventory detail
+ * @param API API key
+ * @return share inventory info
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see me.xhsun.guildwars2wrapper.model.util.Bag character inventory info
+ * @see SharedInventory shared inventory info
*/
- public CharacterInventory getCharacterInventory(String API, String name) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ public List getSharedInventory(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response response = gw2API.getCharacterInventory(name, API).execute();
+ Response> response = gw2API.getSharedInventory(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -228,20 +251,17 @@ public CharacterInventory getCharacterInventory(String API, String name) throws
}
/**
- * For more info on Transaction API go here
- * Get transaction info linked to given API key
+ * For more info on account mail carrier API go here
+ * Get list of unlocked mail carrier id(s) linked to given API key
*
- * @param API API key
- * @param time current | History
- * @param type buy | sell
- * @return list of transaction base on the selection, if there is nothing, return empty list
+ * @param API API key
+ * @return list of mail carrier id(s)
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Transaction transaction info
*/
- public List getListing(String API, Transaction.Time time, Transaction.Type type) throws GuildWars2Exception {
+ public List getUnlockedMailCarriers(String API) throws GuildWars2Exception {
isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getListing(processListingTime(time), processListingType(type), API).execute();
+ Response> response = gw2API.getUnlockedMailCarriers(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -250,15 +270,18 @@ public List getListing(String API, Transaction.Time time, Transacti
}
/**
- * For more info on Listing Price API go here
- * Get all id of items that is on the TP
+ * For more info on account masteries API go here
+ * Get list of unlocked masteries linked to given API key
*
- * @return list of item ids
+ * @param API API key
+ * @return list of unlocked masteries
* @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see UnlockedMastery unlocked mastery info
*/
- public List getAllListedItemID() throws GuildWars2Exception {
+ public List getUnlockedMasteries(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getAllPrices().execute();
+ Response> response = gw2API.getUnlockedMasteries(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -267,18 +290,18 @@ public List getAllListedItemID() throws GuildWars2Exception {
}
/**
- * For more info on Listing Price API go here
- * Get price info for the given item id(s)
+ * For more info on Material Storage API go here
+ * Get detailed info for material storage linked to given API key
*
- * @param ids list of item id
- * @return list of listing price for given id(s)
+ * @param API API key
+ * @return material storage info
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Prices listing price info
+ * @see Material material storage info
*/
- public List getPrices(long[] ids) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public List getMaterialStorage(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getPrices(processIds(ids)).execute();
+ Response> response = gw2API.getMaterialBank(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -287,18 +310,18 @@ public List getPrices(long[] ids) throws GuildWars2Exception {
}
/**
- * For more info on Currency API go here
- * Get currency info for the given currency id(s)
+ * For more info on account minis API go here
+ * Get list of unlocked mini id(s) linked to given API key
*
- * @param ids list of currency id
- * @return list of currency info
+ * @param API API key
+ * @return list of mini id(s)
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Currency currency info
+ * @see Mini mini info
*/
- public List getCurrencyInfo(long[] ids) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public List getUnlockedMinis(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getCurrencyInfo(processIds(ids)).execute();
+ Response> response = gw2API.getUnlockedMinis(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -307,16 +330,17 @@ public List getCurrencyInfo(long[] ids) throws GuildWars2Exception {
}
/**
- * For more info on Currency API go here
- * Get all currency ids
+ * For more info on account outfits API go here
+ * Get list of unlocked outfit id(s) linked to given API key
*
- * @return list of currency ids
+ * @param API API key
+ * @return list of outfit id(s)
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Currency currency info
*/
- public List getAllCurrencyID() throws GuildWars2Exception {
+ public List getUnlockedOutfits(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getAllCurrencies().execute();
+ Response> response = gw2API.getUnlockedOutfits(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -325,18 +349,17 @@ public List getAllCurrencyID() throws GuildWars2Exception {
}
/**
- * For more info on World API go here
- * Get world info for the given world id(s)
+ * For more info on account pvp heroes API go here
+ * Get list of unlocked pvp hero id(s) linked to given API key
*
- * @param ids list of world id
- * @return list of world info
+ * @param API API key
+ * @return list of pvp heroes id(s)
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see World world info
*/
- public List getWorldInfo(long[] ids) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public List getUnlockedPvpHeroes(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getWorldsInfo(processIds(ids)).execute();
+ Response> response = gw2API.getUnlockedPvpHeroes(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -345,16 +368,17 @@ public List getWorldInfo(long[] ids) throws GuildWars2Exception {
}
/**
- * For more info on World API go here
- * Get list of all available world id(s)
+ * For more info on account raid API go here
+ * Get list of cleared raid linked to given API key
*
- * @return list of world id
+ * @param API API key
+ * @return list of cleared raid
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see World world info
*/
- public List getAllWorldID() throws GuildWars2Exception {
+ public List getWeeklyRaidProgression(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
try {
- Response> response = gw2API.getAllWorldsIDs().execute();
+ Response> response = gw2API.getWeeklyRaidProgression(API).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -363,18 +387,18 @@ public List getAllWorldID() throws GuildWars2Exception {
}
/**
- * For more info on Material Category API go here
- * Get material category info for the given category id(s)
+ * For more info on account recipes API go here
+ * Get list of unlocked recipe id(s) linked to given API key
*
- * @param ids list of category id
- * @return list of material category info
+ * @param API API key
+ * @return list of unlocked recipe id(s)
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see MaterialCategory material category info
+ * @see Recipe recipe info
*/
- public List getMaterialCategoryInfo(long[] ids) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.ID, ids));
+ public List