diff --git a/README.md b/README.md
index f7d6bd1..a514514 100644
--- a/README.md
+++ b/README.md
@@ -98,9 +98,15 @@ So if you see anything I missed, please don't hesitate to create an issue to let
+ /v2/achievements
-+ /v2/characters/<name>/core
++ /v2/achievements/*
-+ /v2/characters/<name>/inventory
++ /v2/backstory/*
+
++ /v2/build
+
++ /v2/cats
+
++ /v2/characters
+ /v2/colors
@@ -108,6 +114,8 @@ So if you see anything I missed, please don't hesitate to create an issue to let
+ /v2/commerce/transactions
++ /v2/continents
+
+ /v2/currencies
+ /v2/dungeons
@@ -132,6 +140,10 @@ So if you see anything I missed, please don't hesitate to create an issue to let
+ /v2/outfits
++ /v2/professions
+
++ /v2/pvp/amulets
+
+ /v2/pvp/heroes
+ /v2/raids
@@ -140,14 +152,22 @@ So if you see anything I missed, please don't hesitate to create an issue to let
+ /v2/recipes/search
++ /v2/skills
+
+ /v2/skins
++ /v2/specializations
+
+ /v2/titles
+ /v2/tokeninfo
++ /v2/traits
+
+ /v2/worlds
++ /v2/wvw/abilities
+
## Download
@@ -157,7 +177,7 @@ Download latest [release](https://github.com/xhsun/gw2wrapper/releases) in Maven
me.xhsun.gw2wrapper
gw2wrapper
- 0.4.1
+ 0.6.2
```
@@ -166,7 +186,7 @@ Or Gradle:
```groovy
dependencies {
...
- compile 'me.xhsun.gw2wrapper:gw2wrapper:0.4.1'
+ compile 'me.xhsun.gw2wrapper:gw2wrapper:0.6.2'
...
}
```
diff --git a/comm.properties b/comm.properties
index 6b8e50a..d5c7ad8 100644
--- a/comm.properties
+++ b/comm.properties
@@ -1,5 +1,5 @@
-currentVer=0.4.1
-verDesc=Release All Account Endpoints
+currentVer=0.6.2
+verDesc=Release More Endpoints
groupID=me.xhsun.gw2wrapper
projectName=gw2wrapper
siteUrl=https://github.com/xhsun/gw2wrapper
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java b/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
index 3bca50b..8dcf8b8 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
@@ -4,16 +4,27 @@
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.achievements.AchievementCategory;
+import me.xhsun.guildwars2wrapper.model.achievements.AchievementGroup;
+import me.xhsun.guildwars2wrapper.model.achievements.DailyAchievement;
+import me.xhsun.guildwars2wrapper.model.backstory.BackStoryAnswer;
+import me.xhsun.guildwars2wrapper.model.backstory.BackStoryQuestion;
+import me.xhsun.guildwars2wrapper.model.character.Character;
+import me.xhsun.guildwars2wrapper.model.character.*;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
+import me.xhsun.guildwars2wrapper.model.continent.Continent;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentFloor;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentMap;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentRegion;
import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
+import me.xhsun.guildwars2wrapper.model.pvp.Amulet;
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 me.xhsun.guildwars2wrapper.model.wvw.Ability;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@@ -358,7 +369,6 @@ public void getWallet(String API, Callback> callback) throws GuildW
}
//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
@@ -386,6 +396,181 @@ public void getAchievementInfo(int[] ids, Callback> callback)
gw2API.getAchievementInfo(processIds(ids)).enqueue(callback);
}
+ /**
+ * For more info on achievements categories 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 AchievementCategory achievement category info
+ */
+ public void getAllAchievementCategoryIDs(Callback> callback) throws NullPointerException {
+ gw2API.getAllAchievementCategoryIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on achievements categories 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 category 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 AchievementCategory achievement category info
+ */
+ public void getAchievementCategoryInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getAchievementCategoryInfo(processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on achievements daily 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 DailyAchievement daily achievement info
+ */
+ public void getCurrentDailyAchievements(Callback callback) throws NullPointerException {
+ gw2API.getCurrentDailyAchievements().enqueue(callback);
+ }
+
+ /**
+ * For more info on next achievements daily 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 GuildWars2Exception invalid API key
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see DailyAchievement daily achievement info
+ */
+ public void getNextDailyAchievements(Callback callback) throws GuildWars2Exception, NullPointerException {
+ gw2API.getNextDailyAchievements().enqueue(callback);
+ }
+
+ /**
+ * For more info on achievements groups 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 AchievementGroup achievement group info
+ */
+ public void getAllAchievementGroupID(Callback> callback) throws NullPointerException {
+ gw2API.getAllAchievementGroupIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on achievements groups 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 group 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 AchievementGroup achievement group info
+ */
+ public void getAchievementGroupInfo(String[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getAchievementGroupInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //Back Story
+ /**
+ * For more info on back story answer 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 BackStoryAnswer back story answer info
+ */
+ public void getAllBackStoryAnswerID(Callback> callback) throws NullPointerException {
+ gw2API.getAllBackStoryAnswerIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on back story answer 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 back story answer 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 BackStoryAnswer back story answer info
+ */
+ public void getBackStoryAnswerInfo(String[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getBackStoryAnswerInfo(processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on back story questions 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 BackStoryQuestion back story question info
+ */
+ public void getAllBackStoryQuestionID(Callback> callback) throws NullPointerException {
+ gw2API.getAllBackStoryQuestionIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on back story questions 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 back story question 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 BackStoryQuestion back story question info
+ */
+ public void getBackStoryQuestionInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getBackStoryQuestionInfo(processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on build 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 GameBuild game build info
+ */
+ public void getCurrentGameBuild(Callback callback) throws NullPointerException {
+ gw2API.getCurrentGameBuild().enqueue(callback);
+ }
+
+ //Cats
+
+ /**
+ * For more info on cats 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 Cat cat info
+ */
+ public void getAllCatID(Callback> callback) throws NullPointerException {
+ gw2API.getAllCatIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on cats 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 cat 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 Cat cat info
+ */
+ public void getCatInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getCatInfo(processIds(ids)).enqueue(callback);
+ }
+
//Characters
/**
* For more info on Character API go here
@@ -402,7 +587,7 @@ public void getAllCharacterName(String API, Callback> callback) thr
}
/**
- * For more info on Character Core API go here
+ * For more info on character overview API go here
* Get character information for the given character name that is linked to given API key
*
* @param API API key
@@ -410,13 +595,88 @@ public void getAllCharacterName(String API, Callback> callback) thr
* @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
* @throws GuildWars2Exception invalid API key | empty character name
* @throws NullPointerException if given {@link Callback} is empty
- * @see Core character info
+ * @see Character character info
+ */
+ public void getCharacter(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacter(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on character back story API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CharacterBackStory back store answer info
+ */
+ public void getCharacterBackStory(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterBackStory(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Character Core API go here
+ * Get basic character information for the given character name that is linked to given API key
+ *
+ * @param API API key
+ * @param name name of character
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Core basic character info
*/
public void getCharacterInformation(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
gw2API.getCharacterCore(name, API).enqueue(callback);
}
+ /**
+ * For more info on character crafting API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CraftingLevel character crafting info
+ */
+ public void getCharacterCrafting(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterCrafting(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on character equipment API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CharacterEquipment equipment info
+ */
+ public void getCharacterEquipment(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterEquipment(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on character hero points API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ */
+ public void getCharacterHeroPoints(String API, String name, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterHeroPoints(name, API).enqueue(callback);
+ }
+
/**
* For more info on Character Inventory API go here
* Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@@ -433,8 +693,87 @@ 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 API API key
+ * @param name character name
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see Recipe recipe info
+ */
+ public void getCharacterUnlockedRecipes(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterUnlockedRecipes(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Character SAB 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 name character name
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CharacterSAB character SAB info
+ */
+ public void getCharacterSAB(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterSAB(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Character Skills 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 name character name
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CharacterSkills character skills info
+ */
+ public void getCharacterSkills(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterSkills(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Character Specialization 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 name character name
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CharacterSpecialization character specialization info
+ */
+ public void getCharacterSpecialization(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterSpecialization(name, API).enqueue(callback);
+ }
+
+ /**
+ * For more info on Character Training 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 name character name
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws GuildWars2Exception invalid API key | empty character name
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see CharacterTraining character training info
+ */
+ public void getCharacterTraining(String API, String name, Callback callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ gw2API.getCharacterTraining(name, API).enqueue(callback);
+ }
+ //Colors
/**
* 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
@@ -506,8 +845,233 @@ public void getPrices(int[] ids, Callback> callback) throws GuildWa
gw2API.getPrices(processIds(ids)).enqueue(callback);
}
- //Currencies
+ //Continents
+ /**
+ * For more info on continents 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 Continent continents info
+ */
+ public void getAllContinentID(Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on continents 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 continents 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 Continent continents info
+ */
+ public void getContinentInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentInfo(processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see ContinentFloor continents floor info
+ */
+ public void getAllContinentFloorID(int continentID, Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentFloorIDs(Integer.toString(continentID)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param ids list of floor 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 ContinentFloor continents floor info
+ */
+ public void getContinentFloorInfo(int continentID, int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentFloorInfo(Integer.toString(continentID), processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see ContinentRegion continents region info
+ */
+ public void getAllContinentRegionID(int continentID, int floorID, Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentRegionIDs(Integer.toString(continentID), Integer.toString(floorID)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param ids list of region 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 ContinentRegion continents region info
+ */
+ public void getContinentRegionInfo(int continentID, int floorID, int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentRegionInfo(Integer.toString(continentID), Integer.toString(floorID), processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see ContinentMap continents map info
+ */
+ public void getAllContinentMapID(int continentID, int floorID, int regionID, Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentMapIDs(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param ids list of region map 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 ContinentMap continents map info
+ */
+ public void getContinentMapInfo(int continentID, int floorID, int regionID, int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentMapInfo(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see ContinentMap.Sector continents map sector info
+ */
+ public void getAllContinentSectorID(int continentID, int floorID, int regionID, int mapID, Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentSectorIDs(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param ids list of region map sector 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 ContinentMap.Sector continents map sector info
+ */
+ public void getContinentSectorInfo(int continentID, int floorID, int regionID, int mapID, int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentSectorInfo(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID), processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see ContinentMap.PoI continents map PoI info
+ */
+ public void getAllContinentPOIID(int continentID, int floorID, int regionID, int mapID, Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentPOIIDs(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param ids list of region map PoI 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 ContinentMap.PoI continents map PoI info
+ */
+ public void getContinentPOIInfo(int continentID, int floorID, int regionID, int mapID, int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentPOIInfo(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID), processIds(ids)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param callback callback that is going to be used for {@link Call#enqueue(Callback)}
+ * @throws NullPointerException if given {@link Callback} is empty
+ * @see ContinentMap.Task continents map task info
+ */
+ public void getAllContinentTaskID(int continentID, int floorID, int regionID, int mapID, Callback> callback) throws NullPointerException {
+ gw2API.getAllContinentTaskIDs(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID)).enqueue(callback);
+ }
+
+ /**
+ * For more info on continents API go here
+ * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param ids list of region map task 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 ContinentMap.Task continents map task info
+ */
+ public void getContinentTaskInfo(int continentID, int floorID, int regionID, int mapID, int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getContinentTaskInfo(Integer.toString(continentID), Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID), 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
@@ -770,7 +1334,7 @@ public void getMasteryInfo(int[] ids, Callback> callback) throws G
//Material Categories
/**
- * For more info on Material Category API go here
+ * For more info on Material MaterialCategory 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)}
@@ -782,7 +1346,7 @@ public void getAllMaterialCategoryID(Callback> callback) throws Nu
}
/**
- * For more info on Material Category API go here
+ * For more info on Material MaterialCategory 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
@@ -854,6 +1418,64 @@ public void getOutfitInfo(int[] ids, Callback> callback) throws Gui
gw2API.getOutfitInfo(processIds(ids)).enqueue(callback);
}
+ //Professions
+
+ /**
+ * For more info on professions 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 Profession profession info
+ */
+ public void getAllProfessionID(Callback> callback) throws NullPointerException {
+ gw2API.getAllProfessionIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on professions 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 profession 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 Profession profession info
+ */
+ public void getProfessionInfo(String[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getProfessionInfo(processIds(ids)).enqueue(callback);
+ }
+
+ //PvP Amulets
+
+ /**
+ * For more info on pvp amulets 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 Amulet amulet info
+ */
+ public void getAllPvPAmuletID(Callback> callback) throws NullPointerException {
+ gw2API.getAllPvPAmuletIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on pvp amulets 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 amulet 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 Amulet amulet info
+ */
+ public void getPvPAmuletInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getPvPAmuletInfo(processIds(ids)).enqueue(callback);
+ }
+
//PvP Heroes
/**
@@ -956,6 +1578,35 @@ public void searchRecipes(boolean isInput, int id, Callback> callb
else gw2API.searchOutputRecipes(Integer.toString(id)).enqueue(callback);
}
+ //Skills
+
+ /**
+ * For more info on Skills 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 Skill skill info
+ */
+ public void getAllSkillID(Callback> callback) throws NullPointerException {
+ gw2API.getAllSkillIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on Skills 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 skill 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 Skill skill info
+ */
+ public void getSkillInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getSkillInfo(processIds(ids)).enqueue(callback);
+ }
+
//Skins
/**
@@ -985,6 +1636,35 @@ public void getSkinInfo(int[] ids, Callback> callback) throws GuildWa
gw2API.getSkinInfo(processIds(ids)).enqueue(callback);
}
+ //Specializations
+
+ /**
+ * For more info on specializations 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 Specialization specialization info
+ */
+ public void getAllSpecializationID(Callback> callback) throws NullPointerException {
+ gw2API.getAllSpecializationIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on specializations 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 specialization 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 Specialization specialization info
+ */
+ public void getSpecializationInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getSpecializationInfo(processIds(ids)).enqueue(callback);
+ }
+
//Titles
/**
@@ -1014,6 +1694,35 @@ public void getTitleInfo(int[] ids, Callback> callback) throws Guild
gw2API.getTitleInfo(processIds(ids)).enqueue(callback);
}
+ //Traits
+
+ /**
+ * For more info on traits 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 Trait trait info
+ */
+ public void getAllTraitID(Callback> callback) throws NullPointerException {
+ gw2API.getAllTraitIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on traits 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 trait 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 Trait trait info
+ */
+ public void getTraitInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getTraitInfo(processIds(ids)).enqueue(callback);
+ }
+
//Worlds
/**
@@ -1042,4 +1751,34 @@ public void getWorldInfo(int[] ids, Callback> callback) throws Guild
isParamValid(new ParamChecker(ids));
gw2API.getWorldsInfo(processIds(ids)).enqueue(callback);
}
+
+ //WvW Abilities
+
+ /**
+ * For more info on WvW abilities 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 Ability WvW abilities info
+ */
+ public void getAllWvWAbilityID(Callback> callback) throws NullPointerException {
+ gw2API.getAllWvWAbilityIDs().enqueue(callback);
+ }
+
+ /**
+ * For more info on WvW abilities 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 WvW abilities 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 Ability WvW abilities info
+ */
+ public void getWvWAbilityInfo(int[] ids, Callback> callback) throws GuildWars2Exception, NullPointerException {
+ isParamValid(new ParamChecker(ids));
+ gw2API.getWvWAbilityInfo(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 ae7b05c..b4ea04e 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java
@@ -14,7 +14,9 @@
* 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
+ * TODO language selection(en - english, de - german, es - spanish, fr - french), default english
+ * TODO method to resolve back story question using answer id
+ * TODO coins to gold/sliver/copper
* @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 767ab7f..3be073d 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java
@@ -3,16 +3,27 @@
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.achievements.AchievementCategory;
+import me.xhsun.guildwars2wrapper.model.achievements.AchievementGroup;
+import me.xhsun.guildwars2wrapper.model.achievements.DailyAchievement;
+import me.xhsun.guildwars2wrapper.model.backstory.BackStoryAnswer;
+import me.xhsun.guildwars2wrapper.model.backstory.BackStoryQuestion;
+import me.xhsun.guildwars2wrapper.model.character.Character;
+import me.xhsun.guildwars2wrapper.model.character.*;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
+import me.xhsun.guildwars2wrapper.model.continent.Continent;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentFloor;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentMap;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentRegion;
import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
+import me.xhsun.guildwars2wrapper.model.pvp.Amulet;
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 me.xhsun.guildwars2wrapper.model.wvw.Ability;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
@@ -102,16 +113,88 @@ interface GuildWars2API {
@GET("/v2/achievements")
Call> getAchievementInfo(@Query("ids") String ids);
+ @GET("/v2/achievements/categories")
+ Call> getAllAchievementCategoryIDs();
+
+ @GET("/v2/achievements/categories")
+ Call> getAchievementCategoryInfo(@Query("ids") String ids);
+
+ @GET("/v2/achievements/daily")
+ Call getCurrentDailyAchievements();
+
+ @GET("/v2/achievements/daily/tomorrow")
+ Call getNextDailyAchievements();
+
+ @GET("/v2/achievements/groups")
+ Call> getAllAchievementGroupIDs();
+
+ @GET("/v2/achievements/groups")
+ Call> getAchievementGroupInfo(@Query("ids") String ids);
+
+ //back story
+ @GET("/v2/backstory/answers")
+ Call> getAllBackStoryAnswerIDs();
+
+ @GET("/v2/backstory/answers")
+ Call> getBackStoryAnswerInfo(@Query("ids") String ids);
+
+ @GET("/v2/backstory/questions")
+ Call> getAllBackStoryQuestionIDs();
+
+ @GET("/v2/backstory/questions")
+ Call> getBackStoryQuestionInfo(@Query("ids") String ids);
+
+ //Current Game Build
+ @GET("/v2/build")
+ Call getCurrentGameBuild();
+
+ //Cats
+ @GET("/v2/cats")
+ Call> getAllCatIDs();
+
+ @GET("/v2/cats")
+ Call> getCatInfo(@Query("ids") String ids);
+
//characters
@GET("/v2/characters")
Call> getAllCharacterName(@Query("access_token") String token);
+ @GET("/v2/characters/{name}")
+ Call getCharacter(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/backstory")
+ Call getCharacterBackStory(@Path("name") String name, @Query("access_token") String token);
+
@GET("/v2/characters/{name}/core")
Call getCharacterCore(@Path("name") String name, @Query("access_token") String token);
+ @GET("/v2/characters/{name}/crafting")
+ Call getCharacterCrafting(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/equipment")
+ Call getCharacterEquipment(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/heropoints")
+ Call> getCharacterHeroPoints(@Path("name") String name, @Query("access_token") String token);
+
@GET("/v2/characters/{name}/inventory")
Call getCharacterInventory(@Path("name") String name, @Query("access_token") String token);
+ @GET("/v2/characters/{name}/recipes")
+ Call getCharacterUnlockedRecipes(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/sab")
+ Call getCharacterSAB(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/skills")
+ Call getCharacterSkills(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/specializations")
+ Call getCharacterSpecialization(@Path("name") String name, @Query("access_token") String token);
+
+ @GET("/v2/characters/{name}/training")
+ Call getCharacterTraining(@Path("name") String name, @Query("access_token") String token);
+
//colors
@GET("/v2/colors")
Call> getAllColorIDs();
@@ -129,6 +212,49 @@ interface GuildWars2API {
@GET("/v2/commerce/prices")
Call> getPrices(@Query("ids") String ids);
+ //continents
+ @GET("/v2/continents")
+ Call> getAllContinentIDs();
+
+ @GET("/v2/continents")
+ Call> getContinentInfo(@Query("ids") String ids);
+
+ @GET("/v2/continents/{continentId}/floors")
+ Call> getAllContinentFloorIDs(@Path("continentId") String continent);
+
+ @GET("/v2/continents/{continentId}/floors")
+ Call> getContinentFloorInfo(@Path("continentId") String continent, @Query("ids") String ids);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions")
+ Call> getAllContinentRegionIDs(@Path("continentId") String continent, @Path("floorId") String floor);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions")
+ Call> getContinentRegionInfo(@Path("continentId") String continent, @Path("floorId") String floor, @Query("ids") String ids);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps")
+ Call> getAllContinentMapIDs(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps")
+ Call> getContinentMapInfo(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Query("ids") String ids);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps/{mapId}/sectors")
+ Call> getAllContinentSectorIDs(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Path("mapId") String map);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps/{mapId}/sectors")
+ Call> getContinentSectorInfo(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Path("mapId") String map, @Query("ids") String ids);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps/{mapId}/pois")
+ Call> getAllContinentPOIIDs(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Path("mapId") String map);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps/{mapId}/pois")
+ Call> getContinentPOIInfo(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Path("mapId") String map, @Query("ids") String ids);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps/{mapId}/tasks")
+ Call> getAllContinentTaskIDs(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Path("mapId") String map);
+
+ @GET("/v2/continents/{continentId}/floors/{floorId}/regions/{regionId}/maps/{mapId}/tasks")
+ Call> getContinentTaskInfo(@Path("continentId") String continent, @Path("floorId") String floor, @Path("regionId") String region, @Path("mapId") String map, @Query("ids") String ids);
+
//currencies
@GET("/v2/currencies")
Call> getAllCurrencies();
@@ -213,6 +339,20 @@ interface GuildWars2API {
@GET("/v2/outfits")
Call> getOutfitInfo(@Query("ids") String ids);
+ //Professions
+ @GET("/v2/professions")
+ Call> getAllProfessionIDs();
+
+ @GET("/v2/professions")
+ Call> getProfessionInfo(@Query("ids") String ids);
+
+ //PvP Amulets
+ @GET("/v2/pvp/amulets")
+ Call> getAllPvPAmuletIDs();
+
+ @GET("/v2/pvp/amulets")
+ Call> getPvPAmuletInfo(@Query("ids") String ids);
+
//PvP Heroes
@GET("/v2/pvp/heroes")
Call> getAllPvPHeroIDs();
@@ -241,6 +381,13 @@ interface GuildWars2API {
@GET("/v2/recipes/search")
Call> searchOutputRecipes(@Query("output") String id);
+ //Skills
+ @GET("/v2/skills")
+ Call> getAllSkillIDs();
+
+ @GET("/v2/skills")
+ Call> getSkillInfo(@Query("ids") String ids);
+
//skins
@GET("/v2/skins")
Call> getAllSkinIDs();
@@ -248,6 +395,13 @@ interface GuildWars2API {
@GET("/v2/skins")
Call> getSkinInfo(@Query("ids") String ids);
+ //Specializations
+ @GET("/v2/specializations")
+ Call> getAllSpecializationIDs();
+
+ @GET("/v2/specializations")
+ Call> getSpecializationInfo(@Query("ids") String ids);
+
//Titles
@GET("/v2/titles")
Call> getAllTitleIDs();
@@ -255,10 +409,24 @@ interface GuildWars2API {
@GET("/v2/titles")
Call> getTitleInfo(@Query("ids") String ids);
+ //Traits
+ @GET("/v2/traits")
+ Call> getAllTraitIDs();
+
+ @GET("/v2/traits")
+ Call> getTraitInfo(@Query("ids") String ids);
+
//worlds
@GET("/v2/worlds")
Call> getAllWorldsIDs();
@GET("/v2/worlds")
Call> getWorldsInfo(@Query("ids") String ids);
+
+ //WvW Abilities
+ @GET("/v2/wvw/abilities")
+ Call> getAllWvWAbilityIDs();
+
+ @GET("/v2/wvw/abilities")
+ Call> getWvWAbilityInfo(@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 eaf77be..3990675 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/Request.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/Request.java
@@ -97,7 +97,6 @@ void isParamValid(ParamChecker... items) throws GuildWars2Exception {
throw new GuildWars2Exception(ErrorCode.ID, "List of id cannot be empty");
}
}
-
}
}
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java b/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
index b5a3179..657c5c7 100644
--- a/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
+++ b/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
@@ -5,16 +5,27 @@
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.achievements.AchievementCategory;
+import me.xhsun.guildwars2wrapper.model.achievements.AchievementGroup;
+import me.xhsun.guildwars2wrapper.model.achievements.DailyAchievement;
+import me.xhsun.guildwars2wrapper.model.backstory.BackStoryAnswer;
+import me.xhsun.guildwars2wrapper.model.backstory.BackStoryQuestion;
+import me.xhsun.guildwars2wrapper.model.character.Character;
+import me.xhsun.guildwars2wrapper.model.character.*;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
+import me.xhsun.guildwars2wrapper.model.continent.Continent;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentFloor;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentMap;
+import me.xhsun.guildwars2wrapper.model.continent.ContinentRegion;
import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
+import me.xhsun.guildwars2wrapper.model.pvp.Amulet;
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 me.xhsun.guildwars2wrapper.model.wvw.Ability;
import retrofit2.Response;
import java.io.IOException;
@@ -505,19 +516,686 @@ public List getAchievementInfo(int[] ids) throws GuildWars2Exceptio
}
}
+ /**
+ * For more info on achievements categories API go here
+ * Get list of all available achievement categories id(s)
+ *
+ * @return list of achievement categories id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see AchievementCategory achievement categories info
+ */
+ public List getAllAchievementCategoryID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllAchievementCategoryIDs().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 achievements categories API go here
+ * Get list of achievement categories info corresponding to the given id(s)
+ *
+ * @param ids list of achievement categories id(s)
+ * @return list of achievement categories info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see AchievementCategory achievement categories info
+ */
+ public List getAchievementCategoryInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getAchievementCategoryInfo(processIds(ids)).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 achievements daily API go here
+ * Get list of current daily achievements
+ *
+ * @return list of current daily achievements
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see DailyAchievement daily achievement info
+ */
+ public DailyAchievement getCurrentDailyAchievements() throws GuildWars2Exception {
+ try {
+ Response response = gw2API.getCurrentDailyAchievements().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 next achievements daily API go here
+ * Get list of tomorrow's daily achievements
+ *
+ * @return list of tomorrow's daily achievements
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see DailyAchievement daily achievement info
+ */
+ public DailyAchievement getNextDailyAchievements() throws GuildWars2Exception {
+ try {
+ Response response = gw2API.getNextDailyAchievements().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 achievements groups API go here
+ * Get list of all available achievement group id(s)
+ *
+ * @return list of achievement group id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see AchievementGroup achievement group info
+ */
+ public List getAllAchievementGroupID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllAchievementGroupIDs().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 achievements groups API go here
+ * Get list of achievement group info corresponding to the given id(s)
+ *
+ * @param ids list of achievement group id(s)
+ * @return list of achievement group info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see AchievementGroup achievement group info
+ */
+ public List getAchievementGroupInfo(String[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getAchievementGroupInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
+ //Back Story
+ /**
+ * For more info on back story answer API go here
+ * Get list of all back story answer id(s)
+ *
+ * @return list of back story answer id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see BackStoryAnswer back story answer info
+ */
+ public List getAllBackStoryAnswerID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllBackStoryAnswerIDs().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 back story answer API go here
+ * Get list of back story answer info corresponding to the given id(s)
+ *
+ * @param ids list of back story answer id(s)
+ * @return list of back story answer info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see BackStoryAnswer back story answer info
+ */
+ public List getBackStoryAnswerInfo(String[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getBackStoryAnswerInfo(processIds(ids)).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 back story questions API go here
+ * Get list of all available back story question id(s)
+ *
+ * @return list of back story question id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see BackStoryQuestion back story question info
+ */
+ public List getAllBackStoryQuestionID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllBackStoryQuestionIDs().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 back story questions API go here
+ * Get list of back story question info corresponding to the given id(s)
+ *
+ * @param ids list of back story question id(s)
+ * @return list of back story question info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see BackStoryQuestion back story question info
+ */
+ public List getBackStoryQuestionInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getBackStoryQuestionInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
+ //Game Build
+ /**
+ * For more info on build API go here
+ * get current game bild
+ *
+ * @return current game build
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see GameBuild game build info
+ */
+ public GameBuild getCurrentGameBuild() throws GuildWars2Exception {
+ try {
+ Response response = gw2API.getCurrentGameBuild().execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
+ //Cats
+
+ /**
+ * For more info on cats API go here
+ * Get list of all available cat id(s)
+ *
+ * @return list of cat id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Color cat info
+ */
+ public List getAllCatID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllCatIDs().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 cats API go here
+ * Get cat info for the given cat id(s)
+ *
+ * @param ids array of cat id
+ * @return list of cat info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Cat cat info
+ */
+ public List getCatInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getCatInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
//Characters
/**
- * For more info on Character API go here
- * Get all character names linked to given API key
+ * For more info on Character API go here
+ *
+ * @param API API key
+ * @return list of character name
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ */
+ public List getAllCharacterName(String API) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ try {
+ Response> response = gw2API.getAllCharacterName(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 overview API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return character detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Character character info
+ */
+ public Character getCharacter(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacter(name, 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 back story API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return list of {@link BackStoryAnswer#id}
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CharacterBackStory back store answer info
+ */
+ public CharacterBackStory getCharacterBackStory(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterBackStory(name, 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 Core API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return character detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Core basic character info
+ */
+ public Core getCharacterInformation(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterCore(name, 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 crafting API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return list of character crafting info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CraftingLevel character crafting info
+ */
+ public CraftingLevel getCharacterCrafting(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterCrafting(name, 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 equipment API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return list of equipment
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CharacterEquipment equipment info
+ */
+ public CharacterEquipment getCharacterEquipment(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterEquipment(name, 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 hero points API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return list of {@link BackStoryAnswer#id}
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see BackStoryAnswer hero points info
+ */
+ public List getCharacterHeroPoints(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response> response = gw2API.getCharacterHeroPoints(name, 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
+ *
+ * @param API API key
+ * @param name name of character
+ * @return character inventory detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see me.xhsun.guildwars2wrapper.model.util.Bag character inventory info
+ */
+ public CharacterInventory getCharacterInventory(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterInventory(name, 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 Recipes API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return list of {@link Recipe#id}
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Recipe recipe info
+ */
+ public CharacterRecipes getCharacterUnlockedRecipes(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterUnlockedRecipes(name, 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 SAB API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return character SAB detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CharacterSAB character SAB info
+ */
+ public CharacterSAB getCharacterSAB(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterSAB(name, 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 Skills API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return character inventory detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CharacterSkills character skills info
+ */
+ public CharacterSkills getCharacterSkills(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterSkills(name, 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 Specialization API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return character specialization detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CharacterSpecialization character specialization info
+ */
+ public CharacterSpecialization getCharacterSpecialization(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterSpecialization(name, 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 Training API go here
+ *
+ * @param API API key
+ * @param name name of character
+ * @return list of character training detail
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see CharacterTraining character training info
+ */
+ public CharacterTraining getCharacterTraining(String API, String name) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ try {
+ Response response = gw2API.getCharacterTraining(name, 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());
+ }
+ }
+
+ //Colors
+
+ /**
+ * For more info on Color API go here
+ * Get list of all available color id(s)
+ *
+ * @return list of color id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Color color info
+ */
+ public List getAllColorID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllColorIDs().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 Color API go here
+ * Get color info for the given color id(s)
+ *
+ * @param ids array of color id
+ * @return list of color info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Color color info
+ */
+ public List getColorInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getColorInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
+ //TP
+ /**
+ * For more info on Transaction API go here
+ * Get transaction info 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
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Transaction transaction info
+ */
+ public List getListing(String API, Transaction.Time time, Transaction.Type type) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ParamType.API, API));
+ try {
+ Response> response = gw2API.getListing(processListingTime(time), processListingType(type), 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 Listing Price API go here
+ * Get all id of items that is on the TP
+ *
+ * @return list of item ids
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ */
+ public List getAllListedItemID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllPrices().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 Listing Price API go here
+ * Get price info for the given item id(s)
+ *
+ * @param ids list of item id
+ * @return list of listing price for given id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Prices listing price info
+ */
+ public List getPrices(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getPrices(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
+ //Continents
+
+ /**
+ * For more info on continents API go here
+ * Get all continent ids
+ *
+ * @return list of continent ids
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Continent continent info
+ */
+ public List getAllContinentID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllContinentIDs().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 continents API go here
+ * Get continent info for the given continent id(s)
+ *
+ * @param ids list of continent id
+ * @return list of continent info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Continent continent info
+ */
+ public List getContinentInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getContinentInfo(processIds(ids)).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 continents API go here
+ * Get all continent floor ids
+ *
+ * @param continentID {@link Continent#id}
+ * @return list of continent floor ids
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see ContinentFloor continent floor info
+ */
+ public List getAllContinentFloorID(int continentID) throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllContinentFloorIDs(Integer.toString(continentID)).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 continents API go here
+ * Get continent info for the given continent floor id(s)
*
- * @param API API key
- * @return list of character name
+ * @param continentID {@link Continent#id}
+ * @param ids list of continent floor id
+ * @return list of continent floor info
* @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see ContinentFloor continent floor info
*/
- public List getAllCharacterName(String API) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.API, API));
+ public List getContinentFloorInfo(int continentID, int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
try {
- Response> response = gw2API.getAllCharacterName(API).execute();
+ Response> response = gw2API.getContinentFloorInfo(Integer.toString(continentID), processIds(ids)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -526,41 +1204,64 @@ 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 continents API go here
+ * Get all continent region ids
*
- * @param API API key
- * @param name name of character
- * @return character detail
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @return list of continent region ids
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Core character info
+ * @see ContinentRegion continent region info
*/
- public Core getCharacterInformation(String API, String name) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ public List getAllContinentRegionID(int continentID, int floorID) throws GuildWars2Exception {
try {
- Response response = gw2API.getCharacterCore(name, API).execute();
+ Response> response = gw2API.getAllContinentRegionIDs(Integer.toString(continentID),
+ Integer.toString(floorID)).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 continents API go here
+ * Get continent region info for the given continent region id(s)
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param ids list of continent region id
+ * @return list of continent region info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see ContinentRegion continent region info
+ */
+ public List getContinentRegionInfo(int continentID, int floorID, int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getContinentRegionInfo(Integer.toString(continentID),
+ Integer.toString(floorID), processIds(ids)).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 continents API go here
+ * Get all continent map ids
*
- * @param API API key
- * @param name name of character to get inventory info
- * @return character inventory detail
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @return list of continent map ids
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see me.xhsun.guildwars2wrapper.model.util.Bag character inventory info
+ * @see ContinentMap continent map info
*/
- public CharacterInventory getCharacterInventory(String API, String name) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
+ public List getAllContinentMapID(int continentID, int floorID, int regionID) throws GuildWars2Exception {
try {
- Response response = gw2API.getCharacterInventory(name, API).execute();
+ Response> response = gw2API.getAllContinentMapIDs(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -568,19 +1269,46 @@ public CharacterInventory getCharacterInventory(String API, String name) throws
}
}
- //Colors
+ /**
+ * For more info on continents API go here
+ * Get continent map info for the given continent map id(s)
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param ids list of continent map id
+ * @return list of continent map info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see ContinentMap continent map info
+ */
+ public List getContinentMapInfo(int continentID, int floorID, int regionID, int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getContinentMapInfo(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), processIds(ids)).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 Color API go here
- * Get list of all available color id(s)
+ * For more info on continents API go here
+ * Get all continent map sector ids
*
- * @return list of color id(s)
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @return list of continent map sector ids
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Color color info
+ * @see ContinentMap.Sector continent map sector info
*/
- public List getAllColorID() throws GuildWars2Exception {
+ public List getAllContinentSectorID(int continentID, int floorID, int regionID, int mapID) throws GuildWars2Exception {
try {
- Response> response = gw2API.getAllColorIDs().execute();
+ Response> response = gw2API.getAllContinentSectorIDs(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -589,18 +1317,23 @@ public List getAllColorID() throws GuildWars2Exception {
}
/**
- * For more info on Color API go here
- * Get color info for the given color id(s)
+ * For more info on continents API go here
+ * Get continent map sector info for the given continent map sector id(s)
*
- * @param ids array of color id
- * @return list of color info
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param ids list of continent map sector id
+ * @return list of continent map sector info
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Color color info
+ * @see ContinentMap.Sector continent map sector info
*/
- public List getColorInfo(int[] ids) throws GuildWars2Exception {
+ public List getContinentSectorInfo(int continentID, int floorID, int regionID, int mapID, int[] ids) throws GuildWars2Exception {
isParamValid(new ParamChecker(ids));
try {
- Response> response = gw2API.getColorInfo(processIds(ids)).execute();
+ Response> response = gw2API.getContinentSectorInfo(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID), processIds(ids)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -608,22 +1341,22 @@ public List getColorInfo(int[] ids) throws GuildWars2Exception {
}
}
- //TP
/**
- * For more info on Transaction API go here
- * Get transaction info linked to given API key
+ * For more info on continents API go here
+ * Get all continent map PoI ids
*
- * @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 continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @return list of continent map PoI ids
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Transaction transaction info
+ * @see ContinentMap.Sector continent map PoI info
*/
- public List getListing(String API, Transaction.Time time, Transaction.Type type) throws GuildWars2Exception {
- isParamValid(new ParamChecker(ParamType.API, API));
+ public List getAllContinentPOIID(int continentID, int floorID, int regionID, int mapID) throws GuildWars2Exception {
try {
- Response> response = gw2API.getListing(processListingTime(time), processListingType(type), API).execute();
+ Response> response = gw2API.getAllContinentPOIIDs(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -632,15 +1365,23 @@ 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 continents API go here
+ * Get continent map PoI info for the given continent map PoI id(s)
*
- * @return list of item ids
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param ids list of continent map PoI id
+ * @return list of continent map PoI info
* @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see ContinentMap.PoI continent map PoI info
*/
- public List getAllListedItemID() throws GuildWars2Exception {
+ public List getContinentPOIInfo(int continentID, int floorID, int regionID, int mapID, int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
try {
- Response> response = gw2API.getAllPrices().execute();
+ Response> response = gw2API.getContinentPOIInfo(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID), processIds(ids)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -649,18 +1390,46 @@ 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 continents API go here
+ * Get all continent map task ids
*
- * @param ids list of item id
- * @return list of listing price for given id(s)
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @return list of continent map task ids
* @throws GuildWars2Exception see {@link ErrorCode} for detail
- * @see Prices listing price info
+ * @see ContinentMap.Task continent map task info
*/
- public List getPrices(int[] ids) throws GuildWars2Exception {
+ public List getAllContinentTaskID(int continentID, int floorID, int regionID, int mapID) throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllContinentTaskIDs(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID)).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 continents API go here
+ * Get continent map task info for the given continent map task id(s)
+ *
+ * @param continentID {@link Continent#id}
+ * @param floorID {@link ContinentFloor#id}
+ * @param regionID {@link ContinentRegion#id}
+ * @param mapID {@link ContinentMap#id}
+ * @param ids list of continent map task id
+ * @return list of continent map task info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see ContinentMap.Task continent map task info
+ */
+ public List getContinentTaskInfo(int continentID, int floorID, int regionID, int mapID, int[] ids) throws GuildWars2Exception {
isParamValid(new ParamChecker(ids));
try {
- Response> response = gw2API.getPrices(processIds(ids)).execute();
+ Response> response = gw2API.getContinentTaskInfo(Integer.toString(continentID),
+ Integer.toString(floorID), Integer.toString(regionID), Integer.toString(mapID), processIds(ids)).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
@@ -1031,7 +1800,7 @@ public List getMasteryInfo(int[] ids) throws GuildWars2Exception {
//Material Categories
/**
- * For more info on Material Category API go here
+ * For more info on Material MaterialCategory API go here
* Get list of all available material category ids
*
* @return list of material category id
@@ -1049,7 +1818,7 @@ public List getAllMaterialCategoryID() throws GuildWars2Exception {
}
/**
- * For more info on Material Category API go here
+ * For more info on Material MaterialCategory API go here
* Get material category info for the given category id(s)
*
* @param ids list of category id
@@ -1148,6 +1917,86 @@ public List getOutfitInfo(int[] ids) throws GuildWars2Exception {
}
}
+ //Professions
+
+ /**
+ * For more info on professions API go here
+ * Get all profession id(s)
+ *
+ * @return list of profession id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Profession profession info
+ */
+ public List getAllProfessionID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllProfessionIDs().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 professions API go here
+ * Get profession info for the given profession id(s)
+ *
+ * @param ids list of profession id(s)
+ * @return list of profession info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Profession Profession info
+ */
+ public List getProfessionInfo(String[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getProfessionInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
+ //PvP Amulets
+
+ /**
+ * For more info on pvp amulets API go here
+ * Get all amulet id(s)
+ *
+ * @return list of amulet id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Amulet amulet info
+ */
+ public List getAllPvPAmuletID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllPvPAmuletIDs().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 pvp amulets API go here
+ * Get amulet info for the given amulet id(s)
+ *
+ * @param ids list of amulet id(s)
+ * @return list of amulet info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Amulet amulet info
+ */
+ public List getPvPAmuletInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getPvPAmuletInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
//PvP Heroes
/**
@@ -1290,6 +2139,46 @@ public List searchRecipes(boolean isInput, int id) throws GuildWars2Exc
}
}
+ //Skills
+
+ /**
+ * For more info on Skills API go here
+ * Get list of all available skill ids
+ *
+ * @return list of skill ids
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Skill skill info
+ */
+ public List getAllSkillID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllSkillIDs().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 Skills API go here
+ * Get skill info for the given skill id(s)
+ *
+ * @param ids list of skill id
+ * @return list of skill info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Skill skill info
+ */
+ public List getSkillInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getSkillInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
//Skins
/**
@@ -1330,6 +2219,46 @@ public List getSkinInfo(int[] ids) throws GuildWars2Exception {
}
}
+ //Specializations
+
+ /**
+ * For more info on specializations API go here
+ * Get all specialization id(s)
+ *
+ * @return list of specialization id(s)
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Specialization specialization info
+ */
+ public List getAllSpecializationID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllSpecializationIDs().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 specializations API go here
+ * Get specialization info for the specialization title id(s)
+ *
+ * @param ids list of specialization id(s)
+ * @return list of specialization info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Specialization specialization info
+ */
+ public List getSpecializationInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getSpecializationInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
//Titles
/**
@@ -1370,6 +2299,46 @@ public List getTitleInfo(int[] ids) throws GuildWars2Exception {
}
}
+ //Trait
+
+ /**
+ * For more info on traits API go here
+ * Get list of all available trait id(s)
+ *
+ * @return list of trait id
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Trait trait info
+ */
+ public List getAllTraitID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllTraitIDs().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 traits API go here
+ * Get trait info for the given trait id(s)
+ *
+ * @param ids list of trait id
+ * @return list of trait info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Trait trait info
+ */
+ public List getTraitInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response> response = gw2API.getTraitInfo(processIds(ids)).execute();
+ if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
+ return response.body();
+ } catch (IOException e) {
+ throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
+ }
+ }
+
//Worlds
/**
@@ -1409,4 +2378,44 @@ public List getWorldInfo(int[] ids) throws GuildWars2Exception {
throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
}
}
+
+ //WvW Abilities
+
+ /**
+ * For more info on WvW abilities API go here
+ * Get list of all available wvw ability id(s)
+ *
+ * @return list of wvw ability id
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Ability wvw ability info
+ */
+ public List getAllWvWAbilityID() throws GuildWars2Exception {
+ try {
+ Response> response = gw2API.getAllWvWAbilityIDs().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 WvW abilities API go here
+ * Get wvw ability info for the given world id(s)
+ *
+ * @param ids list of wvw ability id
+ * @return list of wvw ability info
+ * @throws GuildWars2Exception see {@link ErrorCode} for detail
+ * @see Ability wvw ability info
+ */
+ public List getWvWAbilityInfo(int[] ids) throws GuildWars2Exception {
+ isParamValid(new ParamChecker(ids));
+ try {
+ Response