From e7651a56d9bc1a145d8f07fe9605af0815d84be8 Mon Sep 17 00:00:00 2001 From: zetaloop Date: Sat, 4 Apr 2026 07:08:28 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=E6=89=93=E6=89=8B?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=B5=81=E7=A8=8B=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- desc/api/docs/player-api.json | 183 ++++++++++++++++++++++++++++++++-- 1 file changed, 176 insertions(+), 7 deletions(-) diff --git a/desc/api/docs/player-api.json b/desc/api/docs/player-api.json index 3db5ec2..8d7bcaf 100644 --- a/desc/api/docs/player-api.json +++ b/desc/api/docs/player-api.json @@ -240,6 +240,181 @@ } } }, + "/api/v1/players/me": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "summary": "初始化当前用户的打手资料", + "operationId": "playerInitPlayer", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object", + "properties": { + "completionRate": { + "type": "number" + }, + "games": { + "type": "array", + "items": { + "type": "string" + } + }, + "gender": { + "type": "boolean" + }, + "id": { + "type": "integer" + }, + "rating": { + "type": "number" + }, + "services": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "playerId", + "gameId", + "gameName", + "title", + "description", + "price", + "unit", + "availability" + ], + "properties": { + "availability": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "gameId": { + "type": "integer" + }, + "gameName": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "playerId": { + "type": "integer" + }, + "price": { + "type": "number" + }, + "rankRange": { + "type": "string" + }, + "title": { + "type": "string" + }, + "unit": { + "type": "string" + } + } + } + }, + "shopId": { + "type": "string" + }, + "shopName": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "totalOrders": { + "type": "integer" + }, + "user": { + "type": "object", + "required": [ + "id", + "username", + "nickname", + "avatar", + "role", + "verifiedRoles", + "verificationStatus", + "createdAt" + ], + "properties": { + "avatar": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "role": { + "description": "consumer, player, owner, admin", + "type": "string" + }, + "username": { + "type": "string" + }, + "verificationStatus": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "verifiedRoles": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, "/api/v1/players/me/status": { "put": { "consumes": [ @@ -684,12 +859,6 @@ "summary": "创建服务", "operationId": "playerCreateService", "parameters": [ - { - "type": "integer", - "name": "id", - "in": "path", - "required": true - }, { "name": "body", "in": "body", @@ -975,4 +1144,4 @@ "x-github": "https://github.com/zeromicro/go-zero", "x-go-zero-doc": "https://go-zero.dev/", "x-goctl-version": "1.9.2" -} \ No newline at end of file +}