App Friend API
The App Friend API allows App User to manage the friends in the App.
Endpoints
# Endpoints
Filter friends
This endpoint helps filter friends.
Request (FilterFriendReqDTO)
{
"pagination": {
"page": 1,
"size": 10
},
"sortings": [],
"searchKey": ""
}
Response (FriendSummaryResDTO)
{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"userId": "b618fcfb-404e-408e-90fb-e4d663fde7ba",
"avatarUrl": "https://amazon.com/xxxxxx",
"nickname": "bill",
"username": "aritaone"
}
]
}
}
Filter friend requests
This endpoint helps filter friend requests.
Request (FilterFriendReqDTO)
{
"pagination": {
"page": 1,
"size": 10
},
"sortings": [],
"searchKey": ""
}
Response (FriendSummaryResDTO)
{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"userId": "b618fcfb-404e-408e-90fb-e4d663fde7ba",
"avatarUrl": "https://amazon.com/xxxxxx",
"nickname": "bill",
"username": "aritaone"
}
]
}
}
Get friend request badges
This endpoint helps get friend request badges.
Request
GET /app/friends/request-users/badges
Response (FriendRequestBadgeResDTO)
{
"success": true,
"message": "",
"data": {
"badge": 5
}
}
Get friend info
This endpoint helps get friend information.
Request
GET /app/friends/info
Response (FriendInfoResDTO)
{
"success": true,
"message": "",
"data": {
"requestBadge": 5,
"hasBlocked": true
}
}
Filter blocked friends
This endpoint helps filter blocked friends.
Request (FilterBlockedFriendReqDTO)
{
"pagination": {
"page": 1,
"size": 10
},
"sortings": [],
"searchKey": ""
}
Response (BlockedFriendSummaryResDTO)
{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"friendBlockId": "fdsgdhfh-404e-408e-90fb-e4d663fde7ba",
"userId": "b618fcfb-404e-408e-90fb-e4d663fde7ba",
"avatarUrl": "https://amazon.com/xxxxxx",
"nickname": "bill",
"username": "aritaone"
}
]
}
}
Search friends
This endpoint helps search friends.
Request (SearchUserFriendReqDTO)
{
"pagination": {
"page": 1,
"size": 10
},
"sortings": [],
"searchKey": ""
}
Response (SearchUserFriendSummaryResDTO)
{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"userId": "b618fcfb-404e-408e-90fb-e4d663fde7ba",
"avatarUrl": "https://amazon.com/xxxxxx",
"nickname": "bill",
"username": "aritaone",
"friendActionType": 3
}
]
}
}
Request friends
This endpoint helps request friends.
Request
POST /app/friends/users/{user_id}/request
Response (RequestFriendResDTO)
{
"success": true,
"message": "",
"data": {
"friendActionType": 4
}
}
Accept friends
This endpoint helps accept friends.
Request
POST /app/friends/users/{user_id}/accept
Response
{
"success": true,
"message": "",
"data": null
}
Reject friends
This endpoint helps reject friends.
Request
POST /app/friends/users/{user_id}/reject
Response (RejectFriendResDTO)
{
"success": true,
"message": "",
"data": {
"friendActionType": 4
}
}
Remove friends
This endpoint helps remove friends.
Request
DELETE /app/friends/users/{user_id}
Response
{
"success": true,
"message": "",
"data": null
}
Block friends
This endpoint helps block friends.
Request
POST /app/friends/users/{user_id}/block
Response
{
"success": true,
"message": "",
"data": null
}
Unblock friends
This endpoint helps unblock friends.
Request
DELETE /app/friends/users/{user_id}/block
Response
{
"success": true,
"message": "",
"data": null
}
Set friend permission
This endpoint helps set friend permission.
Request (SetFriendPermissionReqDTO)
{
"stepView": true,
"mapView": true,
"mascotView": true,
"avatarView": true
}
Response
{
"success": true,
"message": "",
"data": null
}
Get friend permission
This endpoint helps get friend permission.
Request
GET /app/friends/users/{user_id}/permissions
Response (FriendPermissionResDTO)
{
"success": true,
"message": "",
"data": {
"stepView": true,
"mapView": true,
"mascotView": true,
"avatarView": true
}
}
Set default friend permission
This endpoint helps set default friend permission.
Request (SetFriendDefaultPermissionReqDTO)
{
"searchable": true,
"requestable": true,
"stepViewEnum": 1,
"mapViewEnum": 0,
"mascotViewEnum": 2,
"avatarViewEnum": 2
}
Response
{
"success": true,
"message": "",
"data": null
}
Get default friend permission
This endpoint helps get default friend permission.
Request
GET /app/friends/default-permissions
Response (FriendDefaultPermissionResDTO)
{
"success": true,
"message": "",
"data": {
"searchable": true,
"requestable": true,
"stepViewEnum": 1,
"mapViewEnum": 0,
"mascotViewEnum": 2,
"avatarViewEnum": 2
}
}
Get friend detail
This endpoint helps get friend detail.
Request
GET /app/friends/users/{user_id}
Response (FriendDetailResDTO)
{
"success": true,
"message": "",
"data": {
"userId": "b618fcfb-404e-408e-90fb-e4d663fde7ba",
"profile": {
"useAvatar": true,
"isDefaultAvatar": true,
"avatarUrl": "https://amazon.com/xxxxxx",
"shopItems": [
{
"id": "b2e745cb-4994-11ef-8cf0-7085c2d96f0d",
"name": "小耳",
"subcategoryId": 2,
"thumbnail": "https://jcci-test-media.aritaone.com/share/shop/伙伴角色/伙伴角色",
"riveInputName": "Character",
"riveInputValue": 0,
"coin": 0,
"isPurchased": false,
"isUsing": false,
"tag": null,
"purchasedAt": "2024-08-30T10:15:13.496221Z",
"birthdaySpecial": false,
"order": 10900,
"saleable": true,
"status": 1
}
]
},
"account": {
"username": "AritaOne",
"nickname": "Bill",
"district": "中西區"
},
"statistics": [
{
"id": 0,
"subItems": [
{
"subId": 0,
"section": {
"daily": {
"value": 0,
"subValue": 699963
},
"weekly": {
"value": 0,
"subValue": 699963
},
"monthly": {
"value": 0,
"subValue": 699963
},
"yearly": {
"value": 0,
"subValue": 699963
}
}
},
{
"subId": 0,
"value": 699963,
"subValue": 505775
}
]
}
]
}
}
Check user physique
This endpoint checks user physique.
Request
GET /app/friends/users/{user_id}/physique/check
Response (CheckPhysiqueResDTO)
{
"success": true,
"message": "",
"data": {
"check": true
}
}
Resources
FilterFriendReqDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
searchKey
stringThe search key should be about title.
FriendSummaryResDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
A list of filtered elements.
FriendSummaryItemResDTO
properties
userId
stringThe identifier of the user.
avatarUrl
stringThe avatar of the user.
nickname
stringThe nickname of the user.
username
stringThe username of the user.
FilterBlockedFriendReqDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
searchKey
stringThe search key should be about title.
BlockedFriendSummaryResDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
A list of filtered elements.
BlockedFriendSummaryItemResDTO
properties
friendBlockId
stringThe identifier of the friend block relationship.
userId
StringThe identifier of the user.
avatarUrl
stringThe avatar of the user.
nickname
stringThe nickname of the user.
username
stringThe username of the user.
SearchUserFriendReqDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
searchKey
stringThe search key should be about title.
SearchUserFriendSummaryResDTO
properties
Indicates the page information of the resource.
sortings
A list of sorting elements, the order of the list matters.
A list of filtered elements.
SearchUserFriendSummaryItemResDTO
properties
userId
stringThe identifier of the user.
avatarUrl
stringThe avatar of the user.
nickname
stringThe nickname of the user.
username
stringThe username of the user.
friendActionType
It is used to control the buttons. Please refer to the enum for detail.
RequestFriendResDTO
properties
friendActionType
It is used to control the buttons. Please refer to the enum for detail.
RejectFriendResDTO
properties
friendActionType
It is used to control the buttons. Please refer to the enum for detail.
SetFriendPermissionReqDTO
properties
stepView
booleanIt indicates if the walking goal is viewable or not. If it is null, this field will not be updated.
mapView
booleanIt indicates if the map is viewable or not. If it is null, this field will not be updated.
mascotView
booleanIt indicates if the mascot is viewable or not. If it is null, this field will not be updated.
avatarView
booleanIt indicates if the avatar is viewable or not. If it is null, this field will not be updated.
FriendPermissionResDTO
properties
stepView
booleanIt indicates if the walking goal is viewable or not. If it is null, this field will not be updated.
mapView
booleanIt indicates if the map is viewable or not. If it is null, this field will not be updated.
mascotView
booleanIt indicates if the mascot is viewable or not. If it is null, this field will not be updated.
avatarView
booleanIt indicates if the avatar is viewable or not. If it is null, this field will not be updated.
SetFriendDefaultPermissionReqDTO
properties
searchable
booleanIt indicates if the user is searchable or not. If it is null, this field will not be updated.
requestable
booleanIt indicates if the user is requestable or not. If it is null, this field will not be updated.
stepViewEnum
It indicates if the walking goal is viewable or not. If it is null, this field will not be updated.
mapViewEnum
It indicates if the map is viewable or not. If it is null, this field will not be updated.
mascotViewEnum
It indicates if the mascot is viewable or not. If it is null, this field will not be updated.
avatarViewEnum
It indicates if the avatar is viewable or not. If it is null, this field will not be updated.
FriendDefaultPermissionResDTO
properties
searchable
booleanIt indicates if the user is searchable or not. If it is null, this field will not be updated.
requestable
booleanIt indicates if the user is requestable or not. If it is null, this field will not be updated.
stepViewEnum
It indicates if the walking goal is viewable or not. If it is null, this field will not be updated.
mapViewEnum
It indicates if the map is viewable or not. If it is null, this field will not be updated.
mascotViewEnum
It indicates if the mascot is viewable or not. If it is null, this field will not be updated.
avatarViewEnum
It indicates if the avatar is viewable or not. If it is null, this field will not be updated.
FriendDetailResDTO
properties
userId
stringThe identifier of the user.
profile
The profile and avatar of the user.
account
The account detail of the user.
statistics
The statistics of the user.
FriendAccountDetailResDTO
properties
username
string用戶名稱
nickname
string暱稱
district
string所屬地區
FriendProfileDetailResDTO
properties
useAvatar
booleanIf it is true, use avatar url; if it is false, use mascot with costumes
isDefaultAvatar
booleanIf it is true, it means the avatar url is the default picture; if useAvatar is not true, please ignore this field.
avatarUrl
stringThe avatar url of the user.
shopItems
The using shop item of the user.
FriendProgressDetailResDTO
properties
friendId
stringThe identifier of the friend relationship.
userId
stringThe identifier of the user.
avatarUrl
stringThe avatar of the user.
nickname
stringThe nickname of the user.
username
stringThe username of the user.
FriendShopDetailResDTO
properties
id
stringThe id of the shop item.
name
stringThe name id of the shop item.
The subcategory id of the shop item.
thumbnail
stringThe thumbnail url of the shop item.
riveInputName
stringThe rive input name of the shop item.
riveInputValue
numberThe rive input value of the shop item.
coin
numberThe coin needed to purchase the shop item.
isPurchased
BooleanIt indicates if the shop item has been purchased or not.
isUsing
BooleanIt indicates if the shop item is currently being used by the user.
tag
stringThe reserved tag for the shop item.
purchasedAt
datetimeThe purchased time.
birthdaySpecial
BooleanIt indicates if the shop item is exclusive to the user in the birthday.
order
numberIt is used by Backend for sorting.
saleable
booleanIt indicates if the item is saleable or not.
status
numberIt is the status of the item. It is used by Backend team only and it may be removed in the future.
UserStatisticsItemResDTO
properties
The identifier of the statistics item.
subItem
A list of sub-items
UserStatisticsSubItemResDTO
properties
subId
The identifier of the statistics sub-item.
The section.
value
numberThe corresponding values corrected to the nearest integer.
subValue
numberThe corresponding values corrected to the nearest two decimal places.
FriendRequestBadgeResDTO
properties
badge
numberThe number of the friend requests.
UserStatisticsSubItemSectionItemResDTO
properties
value
numberThe corresponding values corrected to the nearest integer.
subValue
numberThe corresponding values corrected to the nearest two decimal places.
UserStatisticsSubItemSectionResDTO
properties
The daily statistics.
The weekly statistics.
The monthly statistics.
The yearly statistics.
FriendInfoResDTO
properties
requestBadge
numberThe number of the friend requests.
hasBlocked
booleanIt indicates if the user has blocked friends or not.
CheckPhysiqueResDTO
properties
check
BooleanIt returns true if physique is set; otherwise, it returns false.
PermissionEnum
Name | Value |
---|---|
只有我 | 0 |
僅親友可見 | 1 |
所有人可見 | 2 |
FriendActionType
Name | Value |
---|---|
不可搜尋 | 0 |
不可添加 | 1 |
可添加 | 2 |
已請求 | 3 |
可接受/拒絕 | 4 |