listProblemTypes
列出全部顶层错误 code
顶层错误码的封闭注册表。keyset 分页。无需认证。
/v2/problems参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
cursor | string | query | 来自先前 next_cursor 的不透明 keyset cursor。必须以 cur_ 开头。 |
limit | string | query | 页大小 1-100,缺省 20。超过 100 为 400 LIMIT_TOO_LARGE,不钳制。 |
view | string | query | basic(默认)或 full。封闭词表。 |
include | string | query | 逗号分隔的块。未知 token 返回 400 UNKNOWN_INCLUDE。 |
fields | string | query | view/include 之后逗号分隔的顶层键。未知 token 返回 400 UNKNOWN_FIELD。object 与 id 始终保留。 |
ids | string | query | 逗号分隔的 id,最多 100 个。批量车道:无分页。 |
refs | string | query | 逗号分隔的 source:external_id,最多 100 个。批量车道:无分页。 |
include_total | string | query | true 则包含 total。仅 true 或 false。 |
facets | string | query | 逗号分隔的 facet 名称。未知 token 返回 400 UNKNOWN_FACET。 |
sort | string | query | 各集合封闭的排序键。 |
nsfw | string | query | true 包含 r18。false 或缺省则隐藏 r18。仅 true 或 false。 |
响应
facetsmap<string, object[]>具名 facet 桶。仅在请求 facets= 时出现。
«key»object[]可空
itemsobject[]必填本页成员。空数组,从不为 null。
codestring必填顶层错误码。UPPER_SNAKE。
descriptionstring必填英文说明。不得用作判别条件。
domainstring必填类型 URI 的域段。
枚举platformcatalogmemoderationnewsstoreobjectstring必填类型判别字段。恒为 problem_type。
枚举problem_typestatusintegerint64 必填此 code 绑定的 HTTP 状态。每个 code 对应一个状态。
titlestring必填本类型的稳定英文短语。不随请求变化。
typestringuri 必填问题类型 URI。路径最后一段是 code 的 kebab-case 形式。
missingstring[]已请求但不可见的 ids。仅出现在 ids=/refs= 批量车道。
next_cursorstring不透明 keyset cursor。末页省略。
objectstring必填类型判别字段。恒为 list。
枚举listtotalintegerint64仅当 include_total=true 时出现。与 items 同一可见性闸。
请求示例
curl "https://api.nextmoe.dev/v2/problems"