Skip to main content

Statistics API

The Statistics API provides ways for the Staff to get the statistics information about users.

Endpoints

# Endpoints
1
GET
/web/statistics/users/{user_id}
# Get user statistics


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
    number
    The user's coin.
  • expPortion
    number
    The user's experience in the current level.
  • expAll
    number
    The total experience needed to reach the next level.
  • level
    number
    The user level.
  • articleRead
    number
    The number of the articles user read.
  • infoCount
    number
    The number of the community information user read.
  • checkInCount
    number
    The number of the check-in photos user has uploaded.
  • buildingCount
    number
    The number of the buildings in the community.
  • mascotCount
    number
    The number of the mascot user purchased.
  • itemCount
    number
    The number of the shop item user purchased.
  • checkInThumbnails
    array
    A list of url thumbnails.
  • voucherRewardCount
    number
    The number of the rewarded vouchers.
  • voucherRedeemCount
    array
    The number of the redeemed vouchers.
  • lessonLearningCount
    number
    The number of the learning lessons.
  • lessonCompletedCount
    array
    The number of the completed lessons.

CommunityMapResDTO

properties
  • code
    CommunityEnum
    The enum of the community.
  • checkInCount
    number
    The number of the check-in photos user has uploaded.
  • buildingCount
    number
    The number of the buildings in the community.

UserCheckInImageResDTO

properties
  • name
    string
    The name of the building.
  • code
    CommunityEnum
    The enum of the community.
  • thumbnail
    string
    The url thumbnail of the uploaded photos.

ExpResDTO

properties
  • expPortion
    number
    The user's experience portion in the current level.
  • expAll
    number
    The total experience needed to reach the next level.
  • level
    number
    User's level.
  • exp
    number
    User's experience.
  • expChart
    ExpChartResDTO
    A list of sub-items

ExpChartResDTO

properties
  • level
    number
    The level.
  • up
    number
    The experience needed to promote to the next level.
  • expRange
    ExpRangeResDTO
    The range of the experience of the level.

ExpRangeResDTO

properties
  • min
    number
    The minimum value of the level.
  • max
    number
    The maximum value of the level.