端点列表

方法路径说明
GET/hitokoto/random随机返回一条语录(JSON)
GET/hitokoto/list获取语录列表(支持分页、分类筛选)
GET/hitokoto/categories获取所有分类及数量统计
GET/hitokoto/count获取语录总数
GET/hitokoto/:id按 ID 获取指定语录

参数说明

参数端点说明
category/hitokoto/random, /list分类筛选(动漫/文学/诗词/电影/哲理/情感/网络)
format/hitokoto/random返回格式:json(默认)/ text(纯文本)
callback/hitokoto/randomJSONP 回调函数名
page/hitokoto/list页码(默认 1)
size/hitokoto/list每页数量(默认 50,最大 200)

使用示例

随机一条语录
GET /hitokoto/random
指定分类
GET /hitokoto/random?category=动漫
纯文本格式
GET /hitokoto/random?format=text
分页+分类
GET /hitokoto/list?category=诗词&page=1&size=10
所有分类
GET /hitokoto/categories
详细信息
试一试 /hitokoto/random → 查看分类统计 →

在线预览

加载中...