Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5 from xhsun/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
xhsun authored Jun 7, 2017
2 parents 37c5d55 + 4ab298b commit fd72111
Show file tree
Hide file tree
Showing 53 changed files with 3,561 additions and 550 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,9 @@ So if you see anything I missed, please don't hesitate to create an issue to let

+ /v2/account

+ /v2/account/bank
+ /v2/account/*

+ /v2/account/inventory

+ /v2/account/materials

+ /v2/account/wallet
+ /v2/achievements

+ /v2/characters/<name>/core

Expand All @@ -113,20 +109,40 @@ So if you see anything I missed, please don't hesitate to create an issue to let

+ /v2/currencies

+ /v2/dungeons

+ /v2/finishers

+ /v2/gliders

+ /v2/guild/upgrades

+ /v2/items

+ /v2/itemstats

+ /v2/mailcarriers

+ /v2/masteries

+ /v2/materials

+ /v2/minis

+ /v2/outfits

+ /v2/pvp/heroes

+ /v2/raids

+ /v2/recipes

+ /v2/recipes/search

+ /v2/skins

+ /v2/titles

+ /v2/tokeninfo

+ /v2/worlds
Expand Down
2 changes: 1 addition & 1 deletion comm.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
currentVer=0.2.1
currentVer=0.4.1
groupID='me.xhsun.gw2wrapper'
siteUrl='https://github.com/xhsun/gw2wrapper'
gitUrl='https://github.com/xhsun/gw2wrapper.git'
747 changes: 658 additions & 89 deletions src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main/java/me/xhsun/guildwars2wrapper/GuildWars2.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* This class provides two ways user can get and process data from the server:<br/>
* &#32;1) use methods provided by {@link SynchronousRequest} to get data synchronously<br/>
* &#32;2) use methods provided by {@link AsynchronousRequest} to get/process data asynchronously
*
* TODO chatLinkToItemID
* TODO language selection, default english
* @author xhsun
* @since 2017-02-06
*/
Expand Down
209 changes: 169 additions & 40 deletions src/main/java/me/xhsun/guildwars2wrapper/GuildWars2API.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

import me.xhsun.guildwars2wrapper.model.*;
import me.xhsun.guildwars2wrapper.model.account.*;
import me.xhsun.guildwars2wrapper.model.achievements.Achievement;
import me.xhsun.guildwars2wrapper.model.character.CharacterInventory;
import me.xhsun.guildwars2wrapper.model.character.Core;
import me.xhsun.guildwars2wrapper.model.commerce.Prices;
import me.xhsun.guildwars2wrapper.model.commerce.Transaction;
import me.xhsun.guildwars2wrapper.model.guild.Upgrade;
import me.xhsun.guildwars2wrapper.model.pvp.Hero;
import me.xhsun.guildwars2wrapper.model.unlockable.Finisher;
import me.xhsun.guildwars2wrapper.model.unlockable.Glider;
import me.xhsun.guildwars2wrapper.model.unlockable.MailCarrier;
import me.xhsun.guildwars2wrapper.model.unlockable.Outfit;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
Expand All @@ -20,25 +27,81 @@
* @since 2017-02-07
*/
interface GuildWars2API {
//token info
@GET("/v2/tokeninfo")
Call<TokenInfo> getAPIInfo(@Query("access_token") String token);

//accounts
@GET("/v2/account")
Call<Account> getAccount(@Query("access_token") String token);

@GET("/v2/account/achievements")
Call<List<AchievementProgression>> getAchievementProgression(@Query("access_token") String token);

@GET("/v2/account/bank")
Call<List<Bank>> getBank(@Query("access_token") String token);

@GET("/v2/account/dungeons")
Call<List<String>> getDailyDungeonProgression(@Query("access_token") String token);

@GET("/v2/account/dyes")
Call<List<Integer>> getUnlockedDyes(@Query("access_token") String token);

@GET("/v2/account/finishers")
Call<List<UnlockedFinisher>> getUnlockedFinishers(@Query("access_token") String token);

@GET("/v2/account/gliders")
Call<List<Integer>> getUnlockedGliders(@Query("access_token") String token);

@GET("/v2/account/home/cats")
Call<List<Cat>> getUnlockedCats(@Query("access_token") String token);

@GET("/v2/account/home/nodes")
Call<List<String>> getUnlockedHomeNodes(@Query("access_token") String token);

@GET("/v2/account/inventory")
Call<List<SharedInventory>> getSharedInventory(@Query("access_token") String token);

@GET("/v2/account/wallet")
Call<List<Wallet>> getWallet(@Query("access_token") String token);
@GET("/v2/account/mailcarriers")
Call<List<Integer>> getUnlockedMailCarriers(@Query("access_token") String token);

@GET("/v2/account/skins")
Call<List<Long>> getUnlockedSkins(@Query("access_token") String token);
@GET("/v2/account/masteries")
Call<List<UnlockedMastery>> getUnlockedMasteries(@Query("access_token") String token);

@GET("/v2/account/materials")
Call<List<Material>> getMaterialBank(@Query("access_token") String token);

@GET("/v2/account/minis")
Call<List<Integer>> getUnlockedMinis(@Query("access_token") String token);

@GET("/v2/account/outfits")
Call<List<Integer>> getUnlockedOutfits(@Query("access_token") String token);

@GET("/v2/account/pvp/heroes")
Call<List<Integer>> getUnlockedPvpHeroes(@Query("access_token") String token);

@GET("/v2/account/raids")
Call<List<String>> getWeeklyRaidProgression(@Query("access_token") String token);

@GET("/v2/account/recipes")
Call<List<Integer>> getUnlockedRecipes(@Query("access_token") String token);

@GET("/v2/account/skins")
Call<List<Integer>> getUnlockedSkins(@Query("access_token") String token);

@GET("/v2/account/titles")
Call<List<Integer>> getUnlockedTitles(@Query("access_token") String token);

@GET("/v2/account/wallet")
Call<List<Wallet>> getWallet(@Query("access_token") String token);

//achievements
@GET("/v2/achievements")
Call<List<Integer>> getAllAchievementIDs();

@GET("/v2/achievements")
Call<List<Achievement>> getAchievementInfo(@Query("ids") String ids);

//characters
@GET("/v2/characters")
Call<List<String>> getAllCharacterName(@Query("access_token") String token);
Expand All @@ -49,87 +112,153 @@ interface GuildWars2API {
@GET("/v2/characters/{name}/inventory")
Call<CharacterInventory> getCharacterInventory(@Path("name") String name, @Query("access_token") String token);

//colors
@GET("/v2/colors")
Call<List<Integer>> getAllColorIDs();

@GET("/v2/colors")
Call<List<Color>> getColorInfo(@Query("ids") String ids);

//TP
@GET("/v2/commerce/transactions/{time}/{type}")
Call<List<Transaction>> getListing(@Path("time") String time, @Path("type") String type, @Query("access_token") String token);

@GET("/v2/commerce/prices")
Call<List<Long>> getAllPrices();
Call<List<Integer>> getAllPrices();

@GET("/v2/commerce/prices")
Call<List<Prices>> getPrices(@Query("ids") String ids);

//other
@GET("/v2/tokeninfo")
Call<TokenInfo> getAPIInfo(@Query("access_token") String token);

//currencies
@GET("/v2/currencies")
Call<List<Long>> getAllCurrencies();
Call<List<Integer>> getAllCurrencies();

@GET("/v2/currencies")
Call<List<Currency>> getCurrencyInfo(@Query("ids") String ids);

//worlds
@GET("/v2/worlds")
Call<List<Integer>> getAllWorldsIDs();
//dungeons
@GET("/v2/dungeons")
Call<List<String>> getAllDungeonName();

@GET("/v2/worlds")
Call<List<World>> getWorldsInfo(@Query("ids") String ids);
@GET("/v2/dungeons")
Call<List<Dungeon>> getDungeonInfo(@Query("ids") String ids);

//material categories
@GET("/v2/materials")
Call<List<Integer>> getAllMaterialBankIDs();
//Finishers
@GET("/v2/finishers")
Call<List<Integer>> getAllFinisherIDs();

@GET("/v2/materials")
Call<List<MaterialCategory>> getMaterialBankInfo(@Query("ids") String ids);
@GET("/v2/finishers")
Call<List<Finisher>> getFinisherInfo(@Query("ids") String ids);

//skins
@GET("/v2/skins")
Call<List<Long>> getAllSkinIDs();
//Gliders
@GET("/v2/gliders")
Call<List<Integer>> getAllGliderIDs();

@GET("/v2/skins")
Call<List<Skin>> getSkinInfo(@Query("ids") String ids);
@GET("/v2/gliders")
Call<List<Glider>> getGliderInfo(@Query("ids") String ids);

//Guild Upgrades
@GET("/v2/guild/upgrades")
Call<List<Integer>> getAllGuildUpgradeIDs();

@GET("/v2/guild/upgrades")
Call<List<Upgrade>> getGuildUpgradeInfo(@Query("ids") String ids);

//items
@GET("/v2/items")
Call<List<Long>> getAllItemIDs();
Call<List<Integer>> getAllItemIDs();

@GET("/v2/items")
Call<List<Item>> getItemInfo(@Query("ids") String ids);

//item stat
@GET("/v2/itemstats")
Call<List<Long>> getAllItemStatIDs();
Call<List<Integer>> getAllItemStatIDs();

@GET("/v2/itemstats")
Call<List<ItemStats>> getItemStatInfo(@Query("ids") String ids);

//colors
@GET("/v2/colors")
Call<List<Long>> getAllColorIDs();
//mail carriers
@GET("/v2/mailcarriers")
Call<List<Integer>> getAllMailCarrierIDs();

@GET("/v2/colors")
Call<List<Color>> getColorInfo(@Query("ids") String ids);
@GET("/v2/mailcarriers")
Call<List<MailCarrier>> getMailCarrierInfo(@Query("ids") String ids);

//masteries
@GET("/v2/masteries")
Call<List<Integer>> getAllMasteryIDs();

@GET("/v2/masteries")
Call<List<Mastery>> getMasteryInfo(@Query("ids") String ids);

//material categories
@GET("/v2/materials")
Call<List<Integer>> getAllMaterialBankIDs();

@GET("/v2/materials")
Call<List<MaterialCategory>> getMaterialBankInfo(@Query("ids") String ids);

//minis
@GET("/v2/minis")
Call<List<Integer>> getAllMiniIDs();

@GET("/v2/minis")
Call<List<Mini>> getMiniInfo(@Query("ids") String ids);

//Outfits
@GET("/v2/outfits")
Call<List<Integer>> getAllOutfitIDs();

@GET("/v2/outfits")
Call<List<Outfit>> getOutfitInfo(@Query("ids") String ids);

//PvP Heroes
@GET("/v2/pvp/heroes")
Call<List<String>> getAllPvPHeroIDs();

@GET("/v2/pvp/heroes")
Call<List<Hero>> getPvPHeroInfo(@Query("ids") String ids);

//Raids
@GET("/v2/raids")
Call<List<String>> getAllRaidIDs();

@GET("/v2/raids")
Call<List<Raid>> getRaidInfo(@Query("ids") String ids);

//recipes
@GET("/v2/recipes")
Call<List<Long>> getAllRecipeIDs();
Call<List<Integer>> getAllRecipeIDs();

@GET("/v2/recipes")
Call<List<Recipe>> getRecipeInfo(@Query("ids") String ids);

//recipes search
@GET("/v2/recipes/search")
Call<List<Long>> searchInputRecipes(@Query("input") String id);
Call<List<Integer>> searchInputRecipes(@Query("input") String id);

@GET("/v2/recipes/search")
Call<List<Long>> searchOutputRecipes(@Query("output") String id);
Call<List<Integer>> searchOutputRecipes(@Query("output") String id);

//minis
@GET("/v2/minis")
Call<List<Long>> getAllMiniIDs();
//skins
@GET("/v2/skins")
Call<List<Integer>> getAllSkinIDs();

@GET("/v2/minis")
Call<List<Mini>> getMiniInfo(@Query("ids") String ids);
@GET("/v2/skins")
Call<List<Skin>> getSkinInfo(@Query("ids") String ids);

//Titles
@GET("/v2/titles")
Call<List<Integer>> getAllTitleIDs();

@GET("/v2/titles")
Call<List<Title>> getTitleInfo(@Query("ids") String ids);

//worlds
@GET("/v2/worlds")
Call<List<Integer>> getAllWorldsIDs();

@GET("/v2/worlds")
Call<List<World>> getWorldsInfo(@Query("ids") String ids);
}
Loading

0 comments on commit fd72111

Please sign in to comment.