Files
novatask/doc/swagger/nova.json
2025-01-08 16:25:48 +08:00

1011 lines
22 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"swagger": "2.0",
"info": {
"title": "",
"description": "nova api",
"version": ""
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/gapi/admin/email_reward": {
"get": {
"summary": "执行发放奖励操作",
"operationId": "SendEmailReward",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"tags": [
"admin"
]
},
"post": {
"summary": "给指定邮箱增加待发放奖励",
"operationId": "AddEmailReward",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EmailReward"
}
}
],
"tags": [
"admin"
]
}
},
"/gapi/admin/nft_holder_update": {
"get": {
"summary": "NFT持有者更新",
"operationId": "NftHolderUpdate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"tags": [
"admin"
]
}
},
"/gapi/admin/stake_settle": {
"get": {
"summary": "软质压手动结算",
"operationId": "StakeSettle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"tags": [
"admin"
]
}
},
"/gapi/carv/bind_role": {
"get": {
"summary": "下载并绑定Castile游戏角色",
"operationId": "DownloadAndBindRole",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CarvResult"
}
}
},
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"type": "string"
},
{
"name": "email",
"in": "query",
"required": true,
"type": "string"
}
],
"tags": [
"carv"
],
"consumes": [
"multipart/form-data"
]
}
},
"/gapi/carv/bind_wallet": {
"get": {
"summary": "注册绑定钱包任务",
"operationId": "BindWallet",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CarvResult"
}
}
},
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"type": "string"
},
{
"name": "email",
"in": "query",
"required": true,
"type": "string"
}
],
"tags": [
"carv"
],
"consumes": [
"multipart/form-data"
]
}
},
"/gapi/carv/check_in_wallet": {
"get": {
"summary": "每日钱包签到任务",
"operationId": "WalletCheckIn",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CarvResult"
}
}
},
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"type": "string"
},
{
"name": "email",
"in": "query",
"required": true,
"type": "string"
}
],
"tags": [
"carv"
],
"consumes": [
"multipart/form-data"
]
}
},
"/gapi/carv/unlock_chapter": {
"get": {
"summary": "游戏主线解锁第x章节",
"operationId": "UnlockChapter",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CarvResult"
}
}
},
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"type": "string"
},
{
"name": "email",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "chapter",
"in": "query",
"required": true,
"type": "integer",
"format": "int32"
}
],
"tags": [
"carv"
],
"consumes": [
"multipart/form-data"
]
}
},
"/gapi/task/v1/community": {
"get": {
"summary": "获取社区列表",
"operationId": "GetCommunityList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/GetCommunityListResp"
}
}
},
"tags": [
"task"
]
}
},
"/gapi/task/v1/nft/stake": {
"post": {
"summary": "质押NFT",
"operationId": "StakeNft",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"parameters": [
{
"name": "body",
"description": " StakeNftList 质押请求参数NFT列表",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StakeNftList"
}
}
],
"tags": [
"task"
],
"security": [
{
"apiKey": []
}
]
}
},
"/gapi/task/v1/nft/stake_reward": {
"get": {
"summary": "质押奖励发放列表",
"operationId": "StakeRewardList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/StakeRewardList"
}
}
},
"tags": [
"task"
],
"security": [
{
"apiKey": []
}
]
}
},
"/gapi/task/v1/nft/unstake": {
"post": {
"summary": "取消质押NFT",
"operationId": "UnStakeNft",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"parameters": [
{
"name": "body",
"description": " UnStakeNftReq 取消质押请求参数",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UnStakeNftReq"
}
}
],
"tags": [
"task"
],
"security": [
{
"apiKey": []
}
]
}
},
"/gapi/task/v1/nfts": {
"get": {
"summary": "拉取玩家持有的nft列表",
"operationId": "GetNftList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/UserNftList"
}
}
},
"parameters": [
{
"name": "wallet_address",
"in": "query",
"required": true,
"type": "string"
}
],
"tags": [
"task"
],
"consumes": [
"multipart/form-data"
],
"security": [
{
"apiKey": []
}
]
}
},
"/gapi/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": []
}
]
}
},
"/gapi/task/v1/task": {
"get": {
"summary": "校验任务结果",
"operationId": "VerifyTaskResult",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/VerifyTaskResultResp"
}
}
},
"parameters": [
{
"name": "id",
"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": []
}
]
}
},
"/gapi/task/v1/task/stake": {
"get": {
"summary": "质押任务详情",
"operationId": "GetStakeTaskDetail",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/StakeTaskDetail"
}
}
},
"tags": [
"task"
],
"security": [
{
"apiKey": []
}
]
}
},
"/gapi/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"
]
}
}
},
"definitions": {
"CarvResult": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/Result"
},
"error": {
"$ref": "#/definitions/Error"
}
},
"title": "CarvResult",
"required": [
"result",
"error"
]
},
"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"
]
},
"EmailKey": {
"type": "object",
"properties": {
"email": {
"type": "string"
}
},
"title": "EmailKey",
"required": [
"email"
]
},
"EmailReward": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": " 邮箱,多个邮箱分号隔开"
},
"reward_type": {
"type": "string",
"description": " 奖励类型: points elite_points castile keys"
},
"value": {
"type": "number",
"format": "double",
"description": " 数量"
},
"remark": {
"type": "string",
"description": " 备注"
}
},
"title": "EmailReward",
"required": [
"email",
"reward_type",
"value",
"remark"
]
},
"Error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
},
"title": "Error",
"required": [
"code",
"message"
]
},
"GetCommunityListResp": {
"type": "object",
"properties": {
"community_list": {
"type": "array",
"items": {
"$ref": "#/definitions/Community"
},
"description": " 社区列表"
}
},
"title": "GetCommunityListResp",
"required": [
"community_list"
]
},
"GetNftListReq": {
"type": "object",
"properties": {
"wallet_address": {
"type": "string"
}
},
"title": "GetNftListReq",
"required": [
"wallet_address"
]
},
"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"
]
},
"Result": {
"type": "object",
"properties": {
"isValid": {
"type": "boolean",
"format": "boolean"
}
},
"title": "Result",
"required": [
"isValid"
]
},
"StakeNftList": {
"type": "object",
"properties": {
"role_id": {
"type": "integer",
"format": "int64",
"description": " 角色id"
},
"token_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": " nft列表"
}
},
"title": "StakeNftList",
"required": [
"token_ids"
]
},
"StakeReward": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": " 日期"
},
"reward": {
"type": "number",
"format": "double",
"description": " 当日发放奖励"
}
},
"title": "StakeReward",
"required": [
"date",
"reward"
]
},
"StakeRewardList": {
"type": "object",
"properties": {
"reward_list": {
"type": "array",
"items": {
"$ref": "#/definitions/StakeReward"
}
}
},
"title": "StakeRewardList",
"required": [
"reward_list"
]
},
"StakeTaskDetail": {
"type": "object",
"properties": {
"start_date": {
"type": "string",
"description": " 开始日期"
},
"end_date": {
"type": "string",
"description": " 结束日期"
},
"count_down": {
"type": "integer",
"format": "int32",
"description": " 剩余结算时间"
},
"produce_token_today": {
"type": "number",
"format": "double",
"description": " 今日产出代币"
},
"game_bonus": {
"type": "integer",
"format": "int32",
"description": " 游戏加成比率"
},
"can_receive_tokens": {
"type": "number",
"format": "double",
"description": " 可领取代币数量"
},
"total_income_tokens": {
"type": "number",
"format": "double",
"description": " 累计收益"
}
},
"title": "StakeTaskDetail",
"required": [
"start_date",
"end_date",
"count_down",
"produce_token_today",
"game_bonus",
"can_receive_tokens",
"total_income_tokens"
]
},
"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": " 按钮文字"
},
"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,10=invite_user,11=ambassador_task"
},
"url": {
"type": "string",
"description": " 跳转链接"
},
"sort": {
"type": "integer",
"format": "int32",
"description": " 排序"
},
"start_at": {
"type": "string",
"description": " 开始时间"
},
"end_at": {
"type": "string",
"description": " 结束时间"
},
"has_finish_count": {
"type": "integer",
"format": "int32",
"description": " 当前完成进度"
},
"total_count": {
"type": "integer",
"format": "int32",
"description": " 总进度"
},
"finish_state": {
"type": "integer",
"format": "int8",
"description": " 0:未完成 1:待校验 2:已完成未领取 3:已领取 4:不可参与"
}
},
"title": "Task",
"required": [
"id",
"community_id",
"title",
"sub_title",
"description",
"points",
"button_text",
"params",
"type",
"url",
"sort",
"start_at",
"end_at",
"has_finish_count",
"total_count",
"finish_state"
]
},
"TaskIdPath": {
"type": "object",
"title": "TaskIdPath"
},
"UnStakeNftReq": {
"type": "object",
"properties": {
"token_id": {
"type": "string",
"description": " nftID"
}
},
"title": "UnStakeNftReq",
"required": [
"token_id"
]
},
"UnlockChapterReq": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"chapter": {
"type": "integer",
"format": "int32"
}
},
"title": "UnlockChapterReq",
"required": [
"email",
"chapter"
]
},
"UserNft": {
"type": "object",
"properties": {
"token_id": {
"type": "string",
"description": " nftID"
},
"image": {
"type": "string",
"description": " nft图片"
},
"has_stake": {
"type": "boolean",
"format": "boolean",
"description": " 是否已质押"
},
"stake_at": {
"type": "string",
"description": " 质押时间"
},
"role_id": {
"type": "integer",
"format": "int64",
"description": " 角色id"
}
},
"title": "UserNft",
"required": [
"token_id",
"image",
"has_stake",
"stake_at",
"role_id"
]
},
"UserNftList": {
"type": "object",
"properties": {
"nft_list": {
"type": "array",
"items": {
"$ref": "#/definitions/UserNft"
}
}
},
"title": "UserNftList",
"required": [
"nft_list"
]
},
"VerifyTaskResultReq": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "uint32",
"description": " 任务ID"
},
"params": {
"type": "string",
"description": " 额外的参数"
}
},
"title": "VerifyTaskResultReq",
"required": [
"id"
]
},
"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"
}
}
}