Notice API
The Notice API provides ways for user get self's notifications.
Endpoints
# Endpoints
Notice page
獲取當前用戶通知分页
Request
POST /app/notice/page
{
"pagination": {
"page": 1,
"size": 3,
"totalItems": 1,
"totalPages": 1
},
"sortings": [
{
"property": "createdAt",
"direction": "DESC"
}
]
}
Response (NoticePageResp)
{
"success": true,
"message": "",
"data": [
{
"pagination": {
"page": 1,
"size": 10,
"totalItems": 3,
"totalPages": 1
},
"sortings": [
{
"direction": "DESC",
"property": "createdAt"
}
],
"items": [
{
"id": "b2be0e33-8f22-4a21-be9a-d97e133bc737",
"sendTime": "2024-06-17T17:19:45.731112",
"title": "加入計劃會員申請",
"content": "您已成功提交加入計劃會員申請,請耐心等待審核結果!",
"isRead": false,
"missionLink": 0
},
{
"id": "b2be0e33-8f22-4a21-be9a-d97e133bc737",
"sendTime": "2024-06-17T11:20:41.279588",
"title": "加入中心成功",
"content": "恭喜您!您已經成功加入中心!",
"isRead": false,
"missionLink": 0
},
{
"id": "b2be0e33-8f22-4a21-be9a-d97e133bc737",
"sendTime": "2024-06-14T15:30:15.38132",
"title": "您提交了切換地區申請",
"content": "您已提交了從地區【中西區】變更至地區【九龍城】的切換地區申請。",
"isRead": false,
"missionLink": 0
}
]
}
]
}
Get notice
標記通知已讀
Request
PUT /app/notice/{id}/read
Response
{
"success": true,
"message": "",
"data": null
}
Delete notice
刪除通知
Request
DELETE /app/notice/{id}
Response
{
"success": true,
"message": "",
"data": null
}
Read all notice
已讀所有通知
Request
PUT /app/notice/read-all
Response
{
"success": true,
"message": "",
"data": null
}
Has new notice
是否有新通知
Request
GET /app/notice/has-new
Response
{
"success": true,
"message": "",
"data": true
}
Resources
PaginationAndSorting
properties
The required pagination class.
sortings
The list of fields to be sorted, the order of the elements matter as it will affect how to resource is sorted.
NoticePageResp
This class extends PaginationAndSorting
properties
id
Stringrequired通知ID
sendTime
datetimerequired發送時間
title
Stringrequired標題
content
Stringrequired內容
isRead
booleanrequired是否已讀
missionLink
The in-app redirect link of the mission.
NoticeDTO
properties
id
Stringrequired通知ID
title
Stringrequired標題
content
Stringrequired內容
createdTime
datetimerequired創建時間