262 lines
5.7 KiB
JSON
262 lines
5.7 KiB
JSON
{
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"title": "",
|
||
"version": ""
|
||
},
|
||
"schemes": [
|
||
"http",
|
||
"https"
|
||
],
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"paths": {
|
||
"/api/task/v1/reward/{id}": {
|
||
"get": {
|
||
"summary": "领取任务奖励",
|
||
"operationId": "GetTaskReward",
|
||
"responses": {
|
||
"200": {
|
||
"description": "A successful response.",
|
||
"schema": {
|
||
"$ref": "#/definitions/GetTaskRewardResp"
|
||
}
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"type": "string"
|
||
}
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"security": [
|
||
{
|
||
"apiKey": []
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/task/v1/task/{id}": {
|
||
"get": {
|
||
"summary": "校验任务结果",
|
||
"operationId": "VerifyTaskResult",
|
||
"responses": {
|
||
"200": {
|
||
"description": "A successful response.",
|
||
"schema": {
|
||
"$ref": "#/definitions/VerifyTaskResultResp"
|
||
}
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"type": "string"
|
||
}
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"security": [
|
||
{
|
||
"apiKey": []
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"/api/task/v1/tasks": {
|
||
"get": {
|
||
"summary": "获取任务列表",
|
||
"operationId": "GetTaskList",
|
||
"responses": {
|
||
"200": {
|
||
"description": "A successful response.",
|
||
"schema": {
|
||
"$ref": "#/definitions/GetTaskListResp"
|
||
}
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"name": "community_id",
|
||
"description": " 所属社区ID",
|
||
"in": "query",
|
||
"required": false,
|
||
"type": "integer",
|
||
"format": "uint32"
|
||
}
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"security": [
|
||
{
|
||
"apiKey": []
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"GetTaskListReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"community_id": {
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"description": " 所属社区ID"
|
||
}
|
||
},
|
||
"title": "GetTaskListReq"
|
||
},
|
||
"GetTaskListResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"tasks": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/Task"
|
||
}
|
||
}
|
||
},
|
||
"title": "GetTaskListResp",
|
||
"required": [
|
||
"tasks"
|
||
]
|
||
},
|
||
"GetTaskRewardResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"points": {
|
||
"type": "integer",
|
||
"format": "int32",
|
||
"description": " 积分"
|
||
}
|
||
},
|
||
"title": "GetTaskRewardResp",
|
||
"required": [
|
||
"points"
|
||
]
|
||
},
|
||
"Task": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"description": " 任务ID"
|
||
},
|
||
"community_id": {
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"description": " 所属社区ID"
|
||
},
|
||
"title": {
|
||
"type": "string",
|
||
"description": " 任务标题"
|
||
},
|
||
"sub_title": {
|
||
"type": "string",
|
||
"description": " 副标题"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": " 任务描述"
|
||
},
|
||
"points": {
|
||
"type": "integer",
|
||
"format": "int32",
|
||
"description": " 任务积分"
|
||
},
|
||
"button_text": {
|
||
"type": "string",
|
||
"description": " 按钮文字"
|
||
},
|
||
"type": {
|
||
"type": "integer",
|
||
"format": "int8",
|
||
"description": " 任务类型: 0=follow_twitter,1=bind_twitter,2=cast_twitter,3=publish_twitter,4=repost_twitter,5=watch_youtube,6=follow_youtube,7=bind_discord,8=join_telegram,9=daily_pay"
|
||
},
|
||
"url": {
|
||
"type": "string",
|
||
"description": " 跳转链接"
|
||
},
|
||
"status": {
|
||
"type": "integer",
|
||
"format": "int8",
|
||
"description": " 任务状态: 0=不启用,1=启用"
|
||
},
|
||
"start_at": {
|
||
"type": "string",
|
||
"description": " 开始时间"
|
||
},
|
||
"end_at": {
|
||
"type": "string",
|
||
"description": " 结束时间"
|
||
},
|
||
"finish_state": {
|
||
"type": "integer",
|
||
"format": "int8",
|
||
"description": " 0:未完成 1:待校验 2:已完成未领取 3:已领取"
|
||
}
|
||
},
|
||
"title": "Task",
|
||
"required": [
|
||
"id",
|
||
"community_id",
|
||
"title",
|
||
"sub_title",
|
||
"description",
|
||
"points",
|
||
"button_text",
|
||
"type",
|
||
"url",
|
||
"status",
|
||
"start_at",
|
||
"end_at",
|
||
"finish_state"
|
||
]
|
||
},
|
||
"TaskIdPath": {
|
||
"type": "object",
|
||
"title": "TaskIdPath"
|
||
},
|
||
"VerifyTaskResultResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"finish": {
|
||
"type": "boolean",
|
||
"format": "boolean",
|
||
"description": " 是否完成"
|
||
}
|
||
},
|
||
"title": "VerifyTaskResultResp",
|
||
"required": [
|
||
"finish"
|
||
]
|
||
}
|
||
},
|
||
"securityDefinitions": {
|
||
"apiKey": {
|
||
"type": "apiKey",
|
||
"description": "Enter JWT Bearer token **_only_**",
|
||
"name": "Authorization",
|
||
"in": "header"
|
||
}
|
||
}
|
||
}
|