地址:https://open.gpic.gd.cn/open-api/rs/api/trademark/tma02/{client_id}?openid={openid}&access_token={access_token}
HTTP POST
client_id,openid,access_token,dbs,exp,nameSection,nameOptions,nameText,imgContent,imgMinScore,analyseCol1,analyseSort1,analyseFormat1,
analyseMinCount1,analyseFilter,analyseCol2,analyseSize1,analyseSort2,analyseSize2,analyseFormat2,analyseMinCount2,analyseFilter 参数含义见外观附录-检索分析参数
{ "exp":"", "dbs":"CN", "analyseCol1":"int_cls", "analyseCol2":"tm_form_type" }
public class SearchClientTest { String client_id = "CLIENT_ID"; String openid = "OPENID"; String access_token = "ACCESS_TOKEN"; /** * 分析 */ public void tma02Test() throws Exception { String url = String.format("/rs/api/trademark/tma02/%s?openid=%s&access_token=%s", client_id, openid, access_token); String json = "{ \n" + " \"exp\":\"\",\n" + " \"dbs\":\"CN\",\n" + " \"analyseCol1\":\"int_cls\",\n" + " \"analyseCol2\":\"tm_form_type\"\n" + "}"; String result = this.POST(url, json); System.out.println(result); } public String POST(String url, String json) throws Exception { HttpClient httpClient = HttpClients.createDefault(); HttpPost httppost = new HttpPost(url); httppost.setHeader("ContentType", "application/json"); StringEntity entity = new StringEntity(json, "UTF-8"); entity.setContentType("application/json"); httppost.setEntity(entity); HttpResponse response = httpClient.execute(httppost); HttpEntity result = response.getEntity(); String ss = EntityUtils.toString(result, "UTF-8"); EntityUtils.consume(entity); return ss; } }
属性名称 | 属性说明 | 属性类型 |
---|---|---|
status | 状态码,0代表成功,其它值含义见附录 | long |
message | 响应的信息描述 | String |
data | 分析结果 | 分析数据详细 |
分析数据详细
属性名称 | 属性说明 | 属性类型 |
---|---|---|
total | 总量 | string |
map | 分析结果 | List<分析结果> -- 分析结果 |
分析结果
属性名称 | 属性说明 | 属性类型 |
---|---|---|
key1 | 一维分析字段 | string |
key2 | 二维分析字段 | string |
value | 分析字段的分析结果 | List<分析字段的分析结果> -- 分析字段的分析结果 |
分析字段的分析结果
属性名称 | 属性说明 | 属性类型 |
---|---|---|
key1 | 一维名称 | string |
key2 | 二维名称 | string |
value | 数量 | string |