1. 本地生活-垃圾分类

垃圾分类(life-garbageClassification)

1.1 请求

请求查询垃圾分类信息,物品名称和物品图片两个参数只需要填写一个。

1、使用物品名称查询

  1. {
  2. "slots": {
  3. "itemName": {
  4. "name": "itemName",
  5. "slotType": "string",
  6. "values": [{
  7. "real": "矿泉水瓶"
  8. }]
  9. }
  10. }
  11. }

2、使用物品图片查

  1. {
  2. "slots": {
  3. "imageUrl": {
  4. "name": "imageUrl",
  5. "slotType": "string",
  6. "values": [{
  7. "real": "https://imageURL/image.png"
  8. }]
  9. }
  10. }
  11. }

3、使用物品图片查

成员名称描述是否必选类型取值范围
itemName物品名称,如:矿泉水瓶否string最大长度:64
imageUrl物品图片地址,如:https://imageURL/image.png否string最大长度:2048

1.2 响应

图文型通用模板内容定义,对应的templateType为:basic-template。

  1. {
  2. "type": "basic-template",
  3. "contentItems": [{
  4. "id": "1",
  5. "title": "矿泉水瓶",
  6. "score": 0,
  7. "content": [{
  8. "subtitle": "矿泉水瓶",
  9. "combBody": "矿泉水瓶,可回收物,要倒净液体、撕下包装、压扁瓶体。。。"
  10. }],
  11. "tag": [{
  12. "tagMode": "NORMAL",
  13. "tagContent": "string",
  14. "color": "NORMAL"
  15. }],
  16. "operateType": "voice",
  17. "voiceCommand": "第1个",
  18. "image": [{
  19. "url": "https://imageURL/image.png",
  20. "imageMode": "SQUARE"
  21. }],
  22. "link": {
  23. "webURL": "https://weburl",
  24. "deepLink": {
  25. "url": "https://deeplinkurl",
  26. "appName": "appname",
  27. "appPackage": "com.app.packagename",
  28. "minVersion": 0,
  29. "minAndroidAPILevel": 0
  30. },
  31. "quickApp": {
  32. "url": "https://quickappurl",
  33. "minPlatformVersion": 0,
  34. "minVersion": 0
  35. }
  36. },
  37. "similarity": 0
  38. }],
  39. "box": "string"
  40. }

成员名称描述是否必选类型取值范围
type卡片模板类型否string枚举值:  basic-template, grid-template, data-template, transaction-template
contentItems图文型模板内容定义否BasicTemplateInfoItem
box图片识别场景,图片识别范围,格式为左,上,右,下的坐标值否string最大长度:64