Extend chat API with /api/site/chat/history endpoint and define ChatHistory schema for retrieving message logs.
This commit is contained in:
1 parent
0c0fc8a8fb
commit
5678ba48ce
2 files changed
+66
No files matched your search
@@ -105,6 +105,8 @@ paths:
|
||||
$ref: './schemas/chat_info/chat_info.yml#/PartyName'
|
||||
/api/site/chat/player/{uuid}/name:
|
||||
$ref: './schemas/chat_info/chat_info.yml#/UserName'
|
||||
/api/site/chat/history:
|
||||
$ref: './schemas/chat_info/chat_info.yml#/ChatHistory'
|
||||
/api/site/chat/send-message/{server}:
|
||||
$ref: './schemas/server-message/server-message.yml#/sendServerMessage'
|
||||
/api/site/chat/send-admin-chat/{server}:
|
||||
|
||||
@@ -44,8 +44,72 @@ PartyName:
|
||||
description: Invalid ID
|
||||
"404":
|
||||
description: Party not found
|
||||
ChatHistory:
|
||||
get:
|
||||
tags:
|
||||
- chatInfo
|
||||
summary: Get chat messages in a range
|
||||
operationId: getChatHistory
|
||||
parameters:
|
||||
- name: from
|
||||
in: query
|
||||
schema:
|
||||
$ref: "#/components/schemas/DateTime"
|
||||
- name: to
|
||||
in: query
|
||||
schema:
|
||||
$ref: "#/components/schemas/DateTime"
|
||||
responses:
|
||||
"200":
|
||||
description: Chat history
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/ChatMessage"
|
||||
components:
|
||||
schemas:
|
||||
DateTime:
|
||||
type: string
|
||||
format: date-time
|
||||
ChatMessage:
|
||||
type: object
|
||||
required:
|
||||
- uuid
|
||||
- message
|
||||
- server
|
||||
- type
|
||||
- timestamp
|
||||
- blocked
|
||||
properties:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
message:
|
||||
type: string
|
||||
server:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- PUBLIC
|
||||
- GLOBAL
|
||||
- PARTY
|
||||
- GAC
|
||||
- MSG
|
||||
- CUSTOM
|
||||
channel:
|
||||
type: string
|
||||
maxLength: 36
|
||||
receiver:
|
||||
type: string
|
||||
maxLength: 36
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
blocked:
|
||||
type: boolean
|
||||
PlayerName:
|
||||
type: object
|
||||
required:
|
||||
|
||||
Reference in new issue
Block a user