ZEPETO.Module.Social
Type | Description |
|---|---|
The SocialService implements social functionalities within ZEPETO World. This service enables players to access social data, such as user's following relationships. And provides the capability to send direct messages to other players. | |
Enum representing the relationship with the local player. | |
The MyFollowerListResponse class provides the information of local player's follower list. | |
The MyFollowingListResponse class provides the API call result and the local player's following list information. | |
The UserFollowInfoListResponse class provides the API call result and the users' following information list. | |
The UserFollowInfoResponse class provides the API call result and the user's following information list. | |
The UserFollowStatusResponse class provides the API call result and the information indicating whether a specified user is in a following relationship with the local player. | |
Enumerates states for direct message popup. | |
UserInfo | User information. |
Following information of a user. | |
Enum representing the user account type. | |
FollowStatus | Represents the following relationship with the local player. |
Class for the official friends list popup. | |
Class for UI elements that displays friend information in official friends list popup. | |
Class for displaying the total number of friends in the official friends list popup. |
SocialService
class
The SocialService implements social functionalities within ZEPETO World. This service enables players to access social data, such as user's following relationships. And provides the capability to send direct messages to other players.
Methods
add_onRoomMemberStatusChanged
static add_onRoomMemberStatusChanged(value: Action<string, RoomMemberStatus>) → void
This asynchronous method retrieves the local player's list of followers.
Parameter | Type |
|---|---|
value | Action<string, RoomMemberStatus> |
GetMyFollowingListAsync
static GetMyFollowingListAsync(nextPageToken?: string) → BaseRequest<MyFollowingListResponse>
This asynchronous method retrieves the local player's following list.
Parameter | Type | Description |
|---|---|---|
nextPageToken (optional) | string | Page token. When calling this method for the first time, set this parameter to null. |
Returns: BaseRequest<MyFollowingListResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the MyFollowingListResponse object by the responseData property.
GetUserFollowInfoAsync
static GetUserFollowInfoAsync(userIds: string[]) → BaseRequest<UserFollowInfoListResponse>
This asynchronous method retrieves follow information from multiple users.
Parameter | Type | Description |
|---|---|---|
userIds | string[] | IDs of users whose follow lists are to be searched. |
Returns: BaseRequest<UserFollowInfoListResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the UserFollowInfoListResponse object by the responseData property.
GetUserFollowInfoAsync
static GetUserFollowInfoAsync(userId: string) → BaseRequest<UserFollowInfoResponse>
This asynchronous method retrieves follow information from a user.
Parameter | Type | Description |
|---|---|---|
userId | string | ID of the user whose follow lists are to be searched. |
Returns: BaseRequest<UserFollowInfoResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the UserFollowInfoResponse object by the responseData property.
GetUserFollowStatusAsync
static GetUserFollowStatusAsync(userId: string) → BaseRequest<UserFollowStatusResponse>
This asynchronous method retrieves the following relationship information between the local player and a user.
Parameter | Type | Description |
|---|---|---|
userId | string | ID of the user whose follow status is to be searched. |
Returns: BaseRequest<UserFollowStatusResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the UserFollowStatusResponse object by the responseData property.
OpenPopupDirectMessage
static OpenPopupDirectMessage(sendMessage: string, userIds?: string[], onComplete?: Action<DirectMessagePopupState>) → void
Invokes a popup to send direct messages to users.
Parameter | Type | Description |
|---|---|---|
sendMessage | string | The body of the message to send. If it is blank or empty, the transmission will fail. |
userIds (optional) | string[] | List of user IDs for potential recipients. If the users parameter is omitted, the recipient selection interface is automatically populated with users from the sender's follow/following list. |
onComplete (optional) | Action<DirectMessagePopupState> | Callback function to be called when message sending is completed or canceled. |
RoomMemberStatus
enum
Enum representing the relationship with the local player.
Name | Value | Description |
|---|---|---|
None | 0 | Indicates whether the local player is not following the user. |
Following | 1 | Indicates whether the local player is following the user. |
Blocked | 3 | Indicates whether the local player blocks the user. |
MyFollowerListResponse
class · extends PlayBaasResponse
The MyFollowerListResponse class provides the information of local player's follower list.
Properties
Name | Type | Description |
|---|---|---|
userCount | number | Number of users that follow the local player. |
users | UserInfo[] | Information of the users that follow the local player. |
nextPageToken | string | The nextPageToken is included in the response when numerous items are available, allowing retrieval of the subsequent follower list. When no items remain, nextPageToken is set to null. |
MyFollowingListResponse
class · extends PlayBaasResponse
The MyFollowingListResponse class provides the API call result and the local player's following list information.
Properties
Name | Type | Description |
|---|---|---|
userCount | number | Number of users the local player is following. |
users | UserInfo[] | Information of the users that the local player is following. |
bookMarkUsers | UserInfo[] | Information of the users that the local player has bookmarked. |
nextPageToken | string | The nextPageToken is included in the response when numerous items are available, allowing retrieval of the subsequent following list. When no items remain, nextPageToken is set to null. |
UserFollowInfoListResponse
class · extends BaseResponse
The UserFollowInfoListResponse class provides the API call result and the users' following information list.
Properties
Name | Type | Description |
|---|---|---|
users | Array of the users' following information list. |
UserFollowInfoResponse
class · extends BaseResponse
The UserFollowInfoResponse class provides the API call result and the user's following information list.
Properties
Name | Type | Description |
|---|---|---|
user | Array of the user's following information list. |
UserFollowStatusResponse
class · extends PlayBaasResponse
The UserFollowStatusResponse class provides the API call result and the information indicating whether a specified user is in a following relationship with the local player.
Properties
Name | Type | Description |
|---|---|---|
status | FollowStatus | Specified user's following relationship with the local player. |
DirectMessagePopupState
enum
Enumerates states for direct message popup.
Name | Value | Description |
|---|---|---|
Cancel | 0 | When the popup is manually closed or if the sending fails. |
SendComplete | 1 | When the send request is completed and it closes. |
UserInfo
class
User information.
Properties
Name | Type | Description |
|---|---|---|
zepetoId | string | Unique user handle, typically presented with the @ symbol. |
userId | string | Internal user identifier. |
name | string | User's display name. |
isOfficialAccount | boolean | Indicates whether this is an official account. |
accountType | User account type. | |
followStatus | FollowStatus | Following relationship with the local player. |
Methods
GetProfileThumbnailAsync
GetProfileThumbnailAsync() → BaseRequest<TextureResponse>
This asynchronous method retrieves the thumbnail of user profile.
Returns: BaseRequest<TextureResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the TextureResponse object by the responseData property.
GetBadgeImageAsync
GetBadgeImageAsync() → BaseRequest<TextureResponse>
This asynchronous method retrieves the badge image from a user's profile if the user is a Greeter or a Creator account.
Returns: BaseRequest<TextureResponse> — A BaseRequest object. When the asynchronous process is complete, you can access the TextureResponse object by the responseData property.
UserFollowInfo
class · extends UserInfo
Following information of a user.
Properties
Name | Type | Description |
|---|---|---|
followingCount | number | Number of users being followed by the account. |
followerCount | number | Number of followers for the account. |
UserAccountType
enum
Enum representing the user account type.
Name | Value | Description |
|---|---|---|
Default | 0 | Common user. |
Greeter | 1 | Account designated for the Greeter program, designed to assist new users. |
FollowStatus
class
Represents the following relationship with the local player.
Properties
Name | Type | Description |
|---|---|---|
isFollower | boolean | Indicates whether the user is a follower of local player. |
isFollowing | boolean | Indicates whether the local player is following the user. |
FollowCellView
class · extends EnhancedScrollerCellView
Class for the official friends list popup.
Properties
Name | Type | Description |
|---|---|---|
textFollowButton | string | Returns the localized text label to be displayed on the follow button within the official friends list popup. The text is automatically translated into the language, matching the device settings. |
textFollowingButton | string | Returns the localized text label to be displayed on the following button within the official friends list popup. The text is automatically translated into the language, matching the device settings. |
cellHeight | number | Returns the height of the user info cell view. |
Events
Name | Type | Description |
|---|---|---|
onCreated | UnityEvent | Returns the event called when the official friends list popup is created. |
onDeactivated | UnityEvent | Returns the event called when the official friends list popup is deactivated. |
onActivated | UnityEvent | Returns the event called when the official friends list popup is activated. |
UserInfoCellView
class · extends FollowCellView
Class for UI elements that displays friend information in official friends list popup.
Properties
Name | Type | Description |
|---|---|---|
userInfo | UserInfo | Returns the user information displayed on the UI. |
textName | string | Returns the account's user name displayed in UI. |
TotalCountCellView
class · extends FollowCellView
Class for displaying the total number of friends in the official friends list popup.
Properties
Name | Type | Description |
|---|---|---|
textCount | string | Returns the localized text for the total number of friends. The text is automatically translated into the language, matching the device settings. |