{ "swagger": "2.0", "info": { "contact": {} }, "paths": { "/api/chatroom/create": { "post": { "description": "创建聊天室", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间管理" ], "summary": "创建聊天室", "parameters": [ { "description": "创建聊天室请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateChatroomReq" } } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/chatroom/delete": { "get": { "description": "删除聊天室", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间管理" ], "summary": "删除聊天室", "parameters": [ { "type": "string", "description": "用户ID", "name": "userId", "in": "query", "required": true }, { "type": "string", "description": "房间ID", "name": "roomId", "in": "query", "required": true } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/chatroom/detail": { "get": { "description": "获取房间详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间操作" ], "summary": "获取房间详情", "parameters": [ { "type": "string", "description": "房间id", "name": "room_id", "in": "query", "required": true } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/chatroom/join": { "post": { "description": "加入房间", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间管理" ], "summary": "加入房间", "parameters": [ { "description": "加入房间请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.JoinChatroomParam" } } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/chatroom/joinCreate": { "post": { "description": "创建并加入房间", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间管理" ], "summary": "创建并加入房间", "parameters": [ { "description": "创建并加入房间请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.JoinChatroomReq" } } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/chatroom/leave": { "post": { "description": "离开房间", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间管理" ], "summary": "离开房间", "parameters": [ { "description": "离开房间请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.LeaveChatroomParam" } } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/chatroom/list": { "get": { "description": "获取聊天室列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "房间管理" ], "summary": "获取聊天室列表", "parameters": [ { "type": "string", "description": "用户ID", "name": "userId", "in": "query", "required": true } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/message/deleteInteract": { "get": { "description": "互动删除", "produces": [ "application/json" ], "tags": [ "消息管理" ], "summary": "互动删除", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "query", "required": true }, { "type": "string", "description": "互动类型", "name": "int_type", "in": "query", "required": true } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}", "schema": { "type": "string" } } } } }, "/api/message/interact": { "get": { "description": "获取互动", "produces": [ "application/json" ], "tags": [ "消息管理" ], "summary": "获取互动", "parameters": [ { "type": "string", "description": "用户id", "name": "userId", "in": "query", "required": true } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}", "schema": { "type": "string" } } } } }, "/api/message/notice": { "get": { "description": "获取公告", "produces": [ "application/json" ], "tags": [ "消息管理" ], "summary": "获取公告", "parameters": [ { "type": "string", "description": "用户id", "name": "userId", "in": "query" } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}", "schema": { "type": "string" } } } } }, "/api/message/notice/read": { "post": { "description": "公告阅读", "produces": [ "application/json" ], "tags": [ "消息管理" ], "summary": "公告阅读", "parameters": [ { "description": "阅读公告", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.NoticeReadReq" } } ], "responses": { "200": { "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}", "schema": { "type": "string" } } } } }, "/api/message/send": { "post": { "description": "发送消息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "消息管理" ], "summary": "发送消息", "parameters": [ { "description": "发送请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.MessageParam" } } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\"}", "schema": { "type": "string" } } } } }, "/api/message/timeline": { "get": { "description": "获取历史消息记录", "produces": [ "application/json" ], "tags": [ "消息管理" ], "summary": "获取历史消息记录", "parameters": [ { "type": "string", "description": "用户id", "name": "userId", "in": "query" }, { "type": "string", "description": "房间id", "name": "roomId", "in": "query", "required": true }, { "type": "integer", "description": "当前页", "name": "pageIndex", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}", "schema": { "type": "string" } } } } } }, "definitions": { "models.CreateChatroomReq": { "type": "object", "properties": { "bCreatorId": { "type": "string" }, "creatorId": { "type": "string" }, "userCount": { "type": "integer" } } }, "models.JoinChatroomParam": { "type": "object", "properties": { "roomId": { "type": "string" }, "userId": { "type": "string" } } }, "models.JoinChatroomReq": { "type": "object", "properties": { "bCreatorId": { "type": "string" }, "creatorId": { "type": "string" }, "userCount": { "type": "integer" } } }, "models.LeaveChatroomParam": { "type": "object", "properties": { "roomId": { "type": "string" }, "userId": { "type": "string" } } }, "models.MessageParam": { "type": "object", "properties": { "message": { "type": "string" }, "messageType": { "type": "string" }, "roomId": { "type": "string" }, "userId": { "type": "string" } } }, "models.NoticeReadReq": { "type": "object", "properties": { "app_id": { "type": "string" }, "notice_id": { "type": "string" }, "user_id": { "type": "string" } } } } }