查看原始 JSON
{
"type": "object",
"required": [
"queryParams"
],
"properties": {
"queryParams": {
"type": "object",
"required": [
"subreddit_name"
],
"properties": {
"sort": {
"enum": [
"BEST",
"HOT",
"NEW",
"TOP",
"CONTROVERSIAL",
"RISING"
],
"type": "string",
"title": "Sort",
"default": "BEST",
"examples": [
"HOT"
],
"description": "排序方式:BEST、HOT、NEW、TOP、CONTROVERSIAL 或 RISING。"
},
"after": {
"type": "string",
"title": "After",
"maxLength": 4096,
"description": "分页参数。"
},
"language": {
"type": "string",
"title": "Language",
"default": "en-US",
"pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
"maxLength": 16,
"minLength": 2,
"description": "返回内容的首选语言,使用 IETF 语言标签;默认为 en-US。"
},
"need_format": {
"type": "boolean",
"title": "Need Format",
"default": false,
"description": "是否清洗并格式化返回数据。"
},
"filter_posts": {
"type": "array",
"items": {
"type": "string",
"pattern": "^t3_[a-z0-9]+$",
"maxLength": 20,
"minLength": 4
},
"title": "Filter Posts",
"default": [],
"maxItems": 100,
"description": "帖子 ID 筛选条件,可选。"
},
"subreddit_name": {
"type": "string",
"title": "Subreddit Name",
"pattern": "^[A-Za-z0-9_]+$",
"examples": [
"AskReddit"
],
"maxLength": 21,
"minLength": 2,
"description": "社区名称。"
}
},
"additionalProperties": true
}
},
"additionalProperties": false
}