垃圾分类
接口说明
看看身边的物品是什么垃圾
请求示例
请求地址
https://api.tangdouz.com/a/garbage.php?nr=香蕉&return=[可填json]
请求地址
https://api.tangdouz.com/a/garbage.php?nr=香蕉&return=
请求参数说明
| 参数名 | 说明 | 是否必填 |
|---|---|---|
nr |
香蕉 | 是 |
return |
可填json | 否 |
返回参数说明
| 参数名 | 说明 |
|---|---|
all |
多个内联键,包含所有匹配的结果,percent为匹配命中率 |
name |
匹配到的垃圾名称 |
category |
垃圾分类 |
JSON返回示例
JSON格式
{
"all": [
{
"name": "香肠",
"category": "湿垃圾",
"percent": 66
},
{
"name": "香菇",
"category": "湿垃圾",
"percent": 66
},
{
"name": "香蕉",
"category": "湿垃圾",
"percent": 100
},
{
"name": "烂香蕉",
"category": "湿垃圾",
"percent": 80
},
{
"name": "香蕉皮",
"category": "湿垃圾",
"percent": 80
},
{
"name": "香蕉干",
"category": "湿垃圾",
"percent": 80
}
],
"name": "香蕉干",
"category": "湿垃圾"
}
在线测试
访问测试接口
点击上方链接将在新窗口打开接口测试页面