Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.
XiaoDeng3386 edited this page Jan 14, 2024 · 3 revisions

Tip

  • 所有接口只支持 GET 方法
  • 接口只在在状态码为 200500 时返回 application/json
  • 本文涉及所有响应结果只在 200 时有效

接口

GET /

获取 XDbot2-CaveApi 基本信息

参数

响应

{
  "version": "0.1.0",
  "count": {
    "total": 2167,
    "valid": 1917
  },
  "code": 200
}
字段 类型 说明
version 字符串 XDbot2-CaveApi 版本
count 对象 回声洞数量
code 整数 状态码

对象 count

字段 类型 说明
total 整数 回声洞总数
valid 整数 有效回声洞数量

GET /random

随机获取回声洞

参数

参数 类型 说明
no_image 布尔 禁止包含图片的回声洞
max_length 整数 最大长度

Important

max_length 只能为正整数,否则会返回 400 Bad Request 错误

响应

{
  "code": 200,
  "id": 673,
  "content": "空:我妹妹深渊公主,我看你们谁敢动我一根手指头\n荧:6",
  "time": 1677236719.8312423,
  "sender": "IP:127.0.0.1",
  "images": {}
}
字段 类型 说明
code 整数 状态码
id 整数 编号
content 字符串 内容
time 浮点数 投稿时间
sender 字符串 发送者
images 对象 包含的图片
Clone this wiki locally