use of riskyken.armourersWorkshop.common.library.global.DownloadUtils.DownloadJsonObjectCallable in project Armourers-Workshop by RiskyKen.
the class GuiGlobalLibraryPanelSkinInfo method checkIfLiked.
private void checkIfLiked() {
PlushieSession plushieSession = PlushieAuth.PLUSHIE_SESSION;
GuiGlobalLibrary globalLibrary = (GuiGlobalLibrary) parent;
int userId = plushieSession.getServerId();
String accessToken = "";
int skinId = skinJson.get("id").getAsInt();
String url = SKIN_ACTION_URL;
url += "?userId=" + String.valueOf(userId);
url += "&accessToken=" + accessToken;
url += "&action=hasLike";
url += "&skinId=" + String.valueOf(skinId);
taskCheckIfLiked = new FutureTask<JsonObject>(new DownloadJsonObjectCallable(url));
((GuiGlobalLibrary) parent).jsonDownloadExecutor.execute(taskCheckIfLiked);
}
use of riskyken.armourersWorkshop.common.library.global.DownloadUtils.DownloadJsonObjectCallable in project Armourers-Workshop by RiskyKen.
the class GuiGlobalLibraryPanelUserSkins method fetchPage.
@Override
protected void fetchPage(int pageIndex) {
if (!downloadedPageList.contains(pageIndex)) {
downloadedPageList.add(pageIndex);
} else {
return;
}
String searchUrl = USER_URL;
searchUrl += "?userId=" + String.valueOf(userId);
searchUrl += "&maxFileVersion=" + String.valueOf(Skin.FILE_VERSION);
searchUrl += "&pageIndex=" + String.valueOf(pageIndex);
searchUrl += "&pageSize=" + String.valueOf(skinPanelResults.getIconCount());
pageCompletion.submit(new DownloadJsonObjectCallable(searchUrl));
}
Aggregations