Statistics API
The Statistics API provides ways for the Staff to get the statistics information about users.
Endpoints
# Endpoints
Get user statistics
This endpoint gets the selected user's statistics.
Request
GET /web/statistics/users/{user_id}
Response (UserStatisticsResDTO)
{
"success": true,
"message": "",
"data": {
"coin": 5,
"expPortion": 5,
"expAll": 5,
"level": 5,
"articleRead": 5,
"infoCount": 5,
"checkInCount": 5,
"buildingCount": 5,
"mascotCount": 5,
"itemCount": 5,
"voucherRewardCount": 5,
"voucherRedeemCount": 5,
"lessonLearningCount": 8,
"lessonCompletedCount": 3,
"checkInThumbnails": [
"https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg",
"https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQutEK4deQ_RHVHb4-vmyZ0XokQzrfFUOKiYhsD8xtF1ggYE8uW",
"https://www.thesprucepets.com/thmb/XdIshJz5OwY-AyxtezwKbfq72Lg=/750x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/bombay-cat-full-profile-history-and-care-5202250-hero-85810f454cf84a7786e650136a10f91c.jpg"
]
}
}
Get user community map
This endpoint gets the selected user's community map.
Request
GET /web/statistics/users/{user_id}/community-map
Response (CommunityMapResDTO)
{
"success": true,
"message": "",
"data": [
{
"code": 0,
"checkInCount": 3,
"buildingCount": 4
}
]
}
Get user community map images
This endpoint gets the selected user's community map images.
Request
GET /web/statistics/users/{user_id}/community-map/{communityEnum}/images
Response (UserCheckInImageResDTO)
{
"success": true,
"message": "",
"data": [
{
"name": "photo 1",
"code": 1,
"thumbnail": "https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg"
}
]
}
Get user statistics exp
This endpoint gets the selected user's experience with chart.
Request
GET /web/statistics/users/{user_id}/exp
Response (ExpResDTO)
{
"success": true,
"message": "",
"data": {
"expPortion": 1550,
"expAll": 3000,
"exp": 5550,
"level": 5,
"expChart": [
{
"level": 2,
"up": 1000,
"expRange": {
"min": 0,
"max": 999
}
}
]
}
}
Resources
UserStatisticsResDTO
properties
coin
numberThe user's coin.
expPortion
numberThe user's experience in the current level.
expAll
numberThe total experience needed to reach the next level.
level
numberThe user level.
articleRead
numberThe number of the articles user read.
infoCount
numberThe number of the community information user read.
checkInCount
numberThe number of the check-in photos user has uploaded.
buildingCount
numberThe number of the buildings in the community.
mascotCount
numberThe number of the mascot user purchased.
itemCount
numberThe number of the shop item user purchased.
checkInThumbnails
arrayA list of url thumbnails.
voucherRewardCount
numberThe number of the rewarded vouchers.
voucherRedeemCount
arrayThe number of the redeemed vouchers.
lessonLearningCount
numberThe number of the learning lessons.
lessonCompletedCount
arrayThe number of the completed lessons.
CommunityMapResDTO
properties
code
The enum of the community.
checkInCount
numberThe number of the check-in photos user has uploaded.
buildingCount
numberThe number of the buildings in the community.
UserCheckInImageResDTO
properties
name
stringThe name of the building.
code
The enum of the community.
thumbnail
stringThe url thumbnail of the uploaded photos.
ExpResDTO
properties
expPortion
numberThe user's experience portion in the current level.
expAll
numberThe total experience needed to reach the next level.
level
numberUser's level.
exp
numberUser's experience.
expChart
A list of sub-items
ExpChartResDTO
properties
level
numberThe level.
up
numberThe experience needed to promote to the next level.
expRange
The range of the experience of the level.
ExpRangeResDTO
properties
min
numberThe minimum value of the level.
max
numberThe maximum value of the level.