@ -55,6 +55,8 @@ public class FineMarketClientHelper {
public static final String TEMPLATES_PARENT_PACKAGE = "parent/" ;
public static final String TEMPLATES_PARENT_PACKAGE = "parent/" ;
public static final String TEMPLATES_TAGS = "filter" ;
public static final String TEMPLATES_TAGS = "filter" ;
public static final String NAME_SEARCH = "?searchKeyword=" ;
public static final String NAME_SEARCH = "?searchKeyword=" ;
public static final String CID_SEARCH = "&cid=" ;
public static final String FR_CID_TYPE = "template_type-1,template_type-2,template_type-3" ;
public static final String RESPONSE_STATE = "state" ;
public static final String RESPONSE_STATE = "state" ;
public static final String RESPONSE_SUCCESS = "ok" ;
public static final String RESPONSE_SUCCESS = "ok" ;
@ -273,7 +275,7 @@ public class FineMarketClientHelper {
* 通过名字搜索模板信息
* 通过名字搜索模板信息
* /
* /
public @Nullable JSONArray getTemplateInfoByName ( String name ) throws IOException {
public @Nullable JSONArray getTemplateInfoByName ( String name ) throws IOException {
String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + ClientHelper . urlEncode ( name , EncodeConstants . ENCODING_UTF_8 ) ;
String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + ClientHelper . urlEncode ( name , EncodeConstants . ENCODING_UTF_8 ) + CID_SEARCH + FR_CID_TYPE ;
String jsonString = HttpToolbox . get ( url ) ;
String jsonString = HttpToolbox . get ( url ) ;
JSONObject jsonObject = new JSONObject ( jsonString ) ;
JSONObject jsonObject = new JSONObject ( jsonString ) ;
String responseState = ( String ) jsonObject . get ( RESPONSE_STATE ) ;
String responseState = ( String ) jsonObject . get ( RESPONSE_STATE ) ;