|
|
|
@ -5,6 +5,7 @@ import com.fr.general.CloudCenter;
|
|
|
|
|
import com.fr.general.http.HttpToolbox; |
|
|
|
|
import com.fr.json.JSONArray; |
|
|
|
|
import com.fr.json.JSONObject; |
|
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
@ -56,7 +57,7 @@ public class FineMarketClientHelper {
|
|
|
|
|
return FINE_MARKET_TEMPLATE_URL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JSONObject getTemplateInfoById(String id) throws IOException { |
|
|
|
|
public @Nullable JSONObject getTemplateInfoById(String id) throws IOException { |
|
|
|
|
String url = FINE_MARKET_TEMPLATE_INFO + id; |
|
|
|
|
String jsonString = HttpToolbox.get(url); |
|
|
|
|
JSONObject jsonObject = new JSONObject(jsonString); |
|
|
|
@ -68,7 +69,7 @@ public class FineMarketClientHelper {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JSONArray getTemplateInfoByName(String name) throws IOException { |
|
|
|
|
public @Nullable JSONArray getTemplateInfoByName(String name) throws IOException { |
|
|
|
|
String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + name; |
|
|
|
|
String jsonString = HttpToolbox.get(url); |
|
|
|
|
JSONObject jsonObject = new JSONObject(jsonString); |
|
|
|
@ -83,7 +84,7 @@ public class FineMarketClientHelper {
|
|
|
|
|
return FINE_MARKET_TEMPLATE_URL + id; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JSONObject getTemplateParentPackageByTemplateId(String id) throws IOException { |
|
|
|
|
public @Nullable JSONObject getTemplateParentPackageByTemplateId(String id) throws IOException { |
|
|
|
|
String url = FINE_MARKET_TEMPLATE_INFO + TEMPLATES_PARENT_PACKAGE + id; |
|
|
|
|
String jsonString = HttpToolbox.get(url); |
|
|
|
|
JSONObject jsonObject = new JSONObject(jsonString); |
|
|
|
|