Mission API
The Mission API provides ways for the Staff to manage the users' coin, exp and token.
Endpoints
# Endpoints
Adjust user coin
This endpoint adjust user coin.
Request (AdjustUserCoinReqDTO)
POST /web/mission/coin/adjust
{
"userId": "084c69e3-988b-4aef-9604-c784ab61d6c2",
"coin": 20
}
Response
{
"success": true,
"message": "",
"data": null
}
Adjust user exp
This endpoint adjust user exp.
Request (AdjustUserExpReqDTO)
POST /web/mission/exp/adjust
{
"userId": "084c69e3-988b-4aef-9604-c784ab61d6c2",
"exp": 10
}
Response
{
"success": true,
"message": "",
"data": null
}
Filter mission
This endpoint filters the missions.
Request (MissionFilterReqDTO)
POST /web/mission/page
{
"pagination": {
"page": 1,
"size": 10
}
}
Response (MissionFilterResDTO)
{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"name": "每日登陸",
"type": "每日",
"coin": 5,
"exp": 0,
"level": 1,
"order": 1
}
]
}
}
Resources
AdjustUserCoinReqDTO
properties
userId
stringrequiredThe identifier of a user.
coin
numberrequiredThe adjusted amount.
AdjustUserExpReqDTO
properties
userId
stringrequiredThe identifier of a user.
exp
numberrequiredThe adjusted amount.
MissionFilterReqDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
MissionFilterResDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
items
A list of filtered elements.
MissionItemResDTO
properties
name
stringThe name of the mission.
type
stringThe type of the mission in text.
coin
numberThe coin earned by the mission.
exp
numberThe experience earned by the mission.
level
numberThe level when the user is allowed to accomplish this mission.
order
numberThe order of the mission. Please note that it is used by the backend only and may be removed in the future. Therefore, the frontend should not use this field.