通用规则
JSON API 现在通过密钥保护,可用于外部项目、移动端和内部集成。
格式
JSON, UTF-8
鉴权
需要密钥
方法
GET, OPTIONS
CORS
已开启
请通过 `X-API-Key` 或 `Authorization: Bearer <key>` 传递密钥。
成功响应都会带有 `ok` 字段。
`lang` 支持 `ru`、`en`、`zh`。
`limit` 范围为 `1` 到 `100`。
`offset` 用于列表分页。
`OPTIONS` 返回 `204`,不支持的方法返回 `405`。
鉴权
没有有效密钥的 API `GET` 请求会返回 `401 Unauthorized`。`OPTIONS` 仍保持开放以支持 CORS 预检。
方式 1: X-API-Key
X-API-Key: <your-secret-key>
方式 2: Authorization Bearer
Authorization: Bearer <your-secret-key>