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'
|
$ref: './schemas/chat_info/chat_info.yml#/PartyName'
|
||||||
/api/site/chat/player/{uuid}/name:
|
/api/site/chat/player/{uuid}/name:
|
||||||
$ref: './schemas/chat_info/chat_info.yml#/UserName'
|
$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}:
|
/api/site/chat/send-message/{server}:
|
||||||
$ref: './schemas/server-message/server-message.yml#/sendServerMessage'
|
$ref: './schemas/server-message/server-message.yml#/sendServerMessage'
|
||||||
/api/site/chat/send-admin-chat/{server}:
|
/api/site/chat/send-admin-chat/{server}:
|
||||||
|
|||||||
@@ -44,8 +44,72 @@ PartyName:
|
|||||||
description: Invalid ID
|
description: Invalid ID
|
||||||
"404":
|
"404":
|
||||||
description: Party not found
|
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:
|
components:
|
||||||
schemas:
|
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:
|
PlayerName:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|||||||
Reference in new issue
Block a user