use of net.technicpack.solder.io.SolderPackInfo in project LauncherV3 by TechnicPack.
the class HttpSolderApi method internalGetPublicSolderPacks.
@Override
public Collection<SolderPackInfo> internalGetPublicSolderPacks(String solderRoot, ISolderApi packFactory) throws RestfulAPIException {
LinkedList<SolderPackInfo> allPackApis = new LinkedList<SolderPackInfo>();
String allPacksUrl = solderRoot + "modpack?include=full&cid=" + clientId;
FullModpacks technic = RestObject.getRestObject(FullModpacks.class, allPacksUrl);
for (SolderPackInfo info : technic.getModpacks().values()) {
ISolderPackApi solder = packFactory.getSolderPack(solderRoot, info.getName(), technic.getMirrorUrl());
info.setSolder(solder);
allPackApis.add(info);
}
return allPackApis;
}
use of net.technicpack.solder.io.SolderPackInfo in project LauncherV3 by TechnicPack.
the class PlatformPackInfoRepository method getInfoFromPlatformInfo.
protected PackInfo getInfoFromPlatformInfo(PlatformPackInfo platformInfo) throws RestfulAPIException {
if (platformInfo != null && platformInfo.hasSolder()) {
try {
ISolderPackApi solderPack = solder.getSolderPack(platformInfo.getSolder(), platformInfo.getName(), solder.getMirrorUrl(platformInfo.getSolder()));
SolderPackInfo solderInfo = solderPack.getPackInfoForBulk();
if (solderInfo == null)
return platformInfo;
else
return new CombinedPackInfo(solderInfo, platformInfo);
} catch (RestfulAPIException ex) {
ex.printStackTrace();
return platformInfo;
}
} else {
return platformInfo;
}
}
use of net.technicpack.solder.io.SolderPackInfo in project LauncherV3 by TechnicPack.
the class HttpSolderPackApi method getPackInfo.
@Override
public SolderPackInfo getPackInfo() throws RestfulAPIException {
String packUrl = baseUrl + "modpack/" + modpackSlug + "?cid=" + clientId;
SolderPackInfo info = RestObject.getRestObject(SolderPackInfo.class, packUrl);
info.setSolder(this);
return info;
}
Aggregations