增加社区列表接口,任务相关接口修改

This commit is contained in:
lianghuanjie
2024-12-19 21:14:14 +08:00
parent 391a9d3481
commit a3c4adfa25
32 changed files with 1163 additions and 197 deletions

View File

@@ -15,6 +15,23 @@
"application/json"
],
"paths": {
"/gapi/task/v1/community": {
"get": {
"summary": "获取社区列表",
"operationId": "GetCommunityList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetCommunityListResp"
}
}
},
"tags": [
"task"
]
}
},
"/gapi/task/v1/reward/{id}": {
"get": {
"summary": "领取任务奖励",
@@ -45,7 +62,7 @@
]
}
},
"/gapi/task/v1/task/{id}": {
"/gapi/task/v1/task": {
"get": {
"summary": "校验任务结果",
"operationId": "VerifyTaskResult",
@@ -60,14 +77,26 @@
"parameters": [
{
"name": "id",
"in": "path",
"description": " 任务ID",
"in": "query",
"required": true,
"type": "integer",
"format": "uint32"
},
{
"name": "params",
"description": " 额外的参数",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"task"
],
"consumes": [
"multipart/form-data"
],
"security": [
{
"apiKey": []
@@ -107,6 +136,63 @@
}
},
"definitions": {
"Community": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "uint32",
"description": " 社区ID"
},
"title": {
"type": "string",
"description": " 社区标题"
},
"logo": {
"type": "string",
"description": " 社区图标"
},
"description": {
"type": "string",
"description": " 社区描述"
},
"start_at": {
"type": "integer",
"format": "int64",
"description": " 开始时间"
},
"end_at": {
"type": "integer",
"format": "int64",
"description": " 结束时间"
}
},
"title": "Community",
"required": [
"id",
"title",
"logo",
"description",
"start_at",
"end_at"
]
},
"GetCommunityListResp": {
"type": "object",
"properties": {
"community_list": {
"type": "array",
"items": {
"$ref": "#/definitions/Community"
},
"description": " 社区列表"
}
},
"title": "GetCommunityListResp",
"required": [
"community_list"
]
},
"GetTaskListReq": {
"type": "object",
"properties": {
@@ -181,19 +267,23 @@
"type": "string",
"description": " 按钮文字"
},
"params": {
"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"
"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,10=invite_user"
},
"url": {
"type": "string",
"description": " 跳转链接"
},
"status": {
"sort": {
"type": "integer",
"format": "int8",
"description": " 任务状态: 0=不启用1=启用"
"format": "int32",
"description": " 排序"
},
"start_at": {
"type": "string",
@@ -203,6 +293,16 @@
"type": "string",
"description": " 结束时间"
},
"has_finish_count": {
"type": "integer",
"format": "int32",
"description": " 当前完成进度"
},
"total_count": {
"type": "integer",
"format": "int32",
"description": " 总进度"
},
"finish_state": {
"type": "integer",
"format": "int8",
@@ -218,11 +318,14 @@
"description",
"points",
"button_text",
"params",
"type",
"url",
"status",
"sort",
"start_at",
"end_at",
"has_finish_count",
"total_count",
"finish_state"
]
},
@@ -230,6 +333,24 @@
"type": "object",
"title": "TaskIdPath"
},
"VerifyTaskResultReq": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "uint32",
"description": " 任务ID"
},
"params": {
"type": "string",
"description": " 额外的参数"
}
},
"title": "VerifyTaskResultReq",
"required": [
"id"
]
},
"VerifyTaskResultResp": {
"type": "object",
"properties": {