Mission API
The Mission API allows App User to manage the mission centre.
Endpoints
# Endpoints
Get my level bar
This endpoint gets my level bar.
Request
GET /app/mission/level-bar
Response (LevelBarResDTO)
{
"success": true,
"message": "",
"data": {
"userType": 2,
"coin": 400,
"token": 3,
"level": 10,
"nickname": "my pet pet",
"showLevelData": false,
"expPortion": 5400,
"expAll": 9000,
"levels": [
{
"level": 9,
"present": false
}
]
}
}
Get my lesson bar
This endpoint gets my lessom bar.
Request
GET /app/mission/lesson/bar
Response (LessonBarResDTO)
{
"success": true,
"message": "",
"data": {
"message": "再完成1個課程就可以獲得獎勵!",
"bars": [
{
"count": 2,
"exp": 500,
"current": true
}
]
}
}
Filter mission
This endpoint filters the missions.
Request (MissionFilterReqDTO)
POST /app/mission/page
{
"pagination": {
"page": 1,
"size": 10
},
"type": 1
}
Response (MissionFilterResDTO)
{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"id": "ffb4a540-54a9-11ef-986b-7085c2d96f0d",
"type": 3,
"name": "為1個地點打卡",
"thumbnail": "https://jcci-test-media.aritaone.com/share/mission/8",
"link": 0,
"item": 0,
"all": 1,
"coin": 4,
"exp": 250,
"token": 0,
"buttonStatus": 0,
"order": 0
}
]
}
}
Claim reward
This endpoint claims reward.
Request (RewardMode)
GET /app/mission/{mission_id}/claim?mode={reward_mode}
Response (RewardResDTO)
{
"success": true,
"message": "",
"data": {
"coin": 5,
"exp": 15,
"token": 0,
"level": 6,
"isLevelUp": false
}
}
Get mission reward
This endpoint gets the mission reward.
Request
GET /app/mission/rewards
The data in the response body is not guaranteed. If there are no rewards, data will be null.
Response (MissionRewardResDTO)
{
"success": true,
"message": "",
"data": {
"missionId": "ffb4a540-54a9-11ef-986b-7085c2d96f0d",
"name": "為1個地點打卡",
"coin": 4,
"exp": 250,
"token": 0
}
}
Get mission badges
This endpoint gets the mission badges.
Request
GET /app/mission/badges
Response (MissionBadgeResDTO)
{
"success": true,
"message": "",
"data": {
"dailyBadge": true,
"limitedBadge": true,
"mascotBadge": true,
"mapBadge": false
}
}
Resources
LevelBarResDTO
properties
coin
numberUser's coin.
level
numberUser's level.
nickname
stringThe nickname of the user.
showLevelData
booleanIt indicates if the level data will be shown or not.
expPortion
numberThe user's experience portion in the current level.
expAll
numberThe total experience needed to reach the next level.
levels
The level progress bar.
LevelDataResDTO
properties
level
numberThe level.
present
booleanIt indicates if there is a present in the level. The present is only available for the PIR user.
LessonBarResDTO
properties
message
stringMessage above the bar.
The progress bar.
LessonDataResDTO
properties
count
numberThe count of the completed lessons.
exp
numberThe gained experience.
current
booleanIt indicates the user's current progress.
RewardResDTO
properties
coin
numberThe coin earned by the mission.
exp
numberThe experience earned by the mission.
token
numberThe token earned by the mission.
level
numberThe level.
isLevelUp
booleanIt indicates if the user is leveled up or not.
MissionFilterReqDTO
properties
type
The type of the mission.
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
id
stringThe identifier of the mission.
type
The type of the mission.
name
stringThe name of the mission.
thumbnail
stringThe url of the mission thumbnail.
link
The in-app redirect link of the mission.
item
numberThe proportion of the mission that the user has achieved.
all
numberThe whole portion of the mission progress.
coin
numberThe coin earned by the mission.
exp
numberThe experience earned by the mission.
token
numberThe token earned by the mission.
buttonStatus
It controls the button of the 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.
MissionRewardResDTO
properties
missionId
stringThe identifier of the mission.
name
stringThe name of the mission.
coin
numberThe coin earned by the mission.
exp
numberThe experience earned by the mission.
token
numberThe token earned by the mission.
MissionBadgeResDTO
properties
dailyBadge
BooleanTrue: 有待領取的每日任務; False: 沒有待領取的每日任務
limitedBadge
BooleanTrue: 有待領取的限定任務; False: 沒有待領取的限定任務
mascotBadge
BooleanTrue: 有待領取的伙伴任務; False: 沒有待領取的伙伴任務
mapBadge
BooleanTrue: 有待領取的打卡任務; False: 沒有待領取的打卡任務
MissionType
Name | Value |
---|---|
每日任務 | 0 |
限定任務 | 1 |
伙伴任務 | 2 |
打卡任務 | 3 |
學習任務 | 4 |
練習任務 | 5 |
親友任務 | 6 |
MissionLink
Name | Value | Wordings |
---|---|---|
- | 0 | - |
步行 | 1 | 步行現況 |
文章 | 2 | 立即閱讀 |
打卡 | 3 | 查看地圖 |
伙伴 | 4 | 立即前往 |
商店 | 5 | 前往商店 |
寶庫-家具 | 6 | 立即前往 |
寶庫-服裝 | 7 | 立即前往 |
問卷 | 8 | 立即前往 |
通知中心 | 9 | 立即前往 |
個人資料 | 10 | 立即前往 |
帳戶資料 | 11 | 立即前往 |
課程 | 12 | 立即學習 |
章節 | 13 | 立即前往 |
功課 | 14 | 我的練習 |
親友 | 15 | 立即添加 |
我的進程 | 16 | 立即前往 |
MissionButtonStatus
Name | Value |
---|---|
未達成任務要求 | 0 |
未達成任務要求(附上連結) | 1 |
待領取獎勵 | 2 |
已領取獎勵 | 3 |
RewardMode
Name | Value |
---|---|
文章 | 0 |
步行 | 1 |
打卡 | 2 |
學習課程 | 3 |