耐撅、耐撅、还是耐撅的 ASS 接口服务
共收录了
61 个姿势 · 今日被掘 5173646 次
输入垃圾名称,返回垃圾类型
接口地址: https://api.vore.top/api/rubbish
返回格式: JSON
请求方式: GET
请求示例: https://api.vore.top/api/rubbish?name=一次性筷子
请求参数说明:
返回参数说明:
返回示例:
{
"code": 200,
"msg": "SUCCESS",
"data": {
"name": "一次性筷子",
"type": "干垃圾或其他垃圾"
},
"time": 1626611636
}
请求详情设置:
请求参数设置:
| 参数名 | 参数值 | 操作 |
|---|---|---|
返回结果:
null
返回码表:
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 200-请求正常 | 500-请求错误 |
| msg | string | SUCCESS-请求正常 | ERROR-请求错误 |
| data -> info/tips | string | 描述当前请求信息(如果存在) |
代码示例:
<?php
//要查询的垃圾种类
$rubbish_name = "一次性筷子";
//拼接url
$url = "https://api.vore.top/api/rubbish?name=".$rubbish_name;
//请求数据并解码
$result = json_decode(file_get_contents($url),true);
//输出返回信息
print_r($result);
?>
当前文档浏览次数:
![]()