PICO Platform Unity SDK
|
Static Public Member Functions | |
static Task< string > | GetAccessToken () |
Returns an access token for this user. More... | |
static Task< User > | GetLoggedInUser () |
Gets the information about the current logged-in user. More... | |
static Task< User > | Get (string userId) |
Gets the information about a specified user. More... | |
static Task< UserList > | GetFriends () |
Gets the friend list of the current user. More... | |
static Task< UserRelationResult > | GetUserRelations (string[] userIds) |
Gets the relationship between the current user and other users. More... | |
static Task< LaunchFriendResult > | LaunchFriendRequestFlow (string userId) |
Launches the flow to apply for friendship with someone. More... | |
static Task< UserRoomList > | GetFriendsAndRooms () |
Gets the friends of the logged-in user and the rooms the friends might be in. More... | |
static Task< UserRoomList > | GetNextUserAndRoomListPage (UserRoomList list) |
Gets the next page of user and room list. More... | |
static Task< UserList > | GetNextUserListPage (UserList list) |
Gets the next page of user list. More... | |
static Task< PermissionResult > | GetAuthorizedPermissions () |
Gets authorized permissions. More... | |
static Task< PermissionResult > | RequestUserPermissions (string[] permissionList) |
Requests user permissions. The user will received a pop-up notification window. More... | |
static Task< EntitlementCheckResult > | EntitlementCheck (bool killApp=true) |
Checks whether the current user is entitled to use the current app. More... | |
Account & Friends service allows developers to access the info of a specified account, get the friends list of the currently logged-in users, send friend requests, and more.
|
inlinestatic |
Returns an access token for this user.
Gets the information about the current logged-in user.
Gets the information about a specified user.
userId | The ID of the user. |
Gets the friend list of the current user.
|
inlinestatic |
Gets the relationship between the current user and other users.
userIds | The list of user IDs. The request queries the current user's relationship with specified users. A single request can pass no more than 20 user IDs. |
UserRelationResult
which is a dictionary of user relationships.
|
inlinestatic |
Launches the flow to apply for friendship with someone.
userId | The ID of the user that the friend request is sent to. |
LaunchFriendRequest
that indicates whether the request is sent successfully.
|
inlinestatic |
Gets the friends of the logged-in user and the rooms the friends might be in.
UserRoomList
that contains the friend and room data. If a friend is not in any room, the room
field will be null.
|
inlinestatic |
Gets the next page of user and room list.
list | The user and room list from the current page. |
Gets the next page of user list.
list | The user list from the current page. |
|
inlinestatic |
Gets authorized permissions.
UserID
field is empty so do NOT use it.
|
inlinestatic |
Requests user permissions. The user will received a pop-up notification window.
permissionList | The list of permissions to request. You can use constants in Pico.Platform.Models.Permissions. The permissions includes:
|
|
inlinestatic |
Checks whether the current user is entitled to use the current app.
If the user is not entitled, the system will close the app and show a dialog box to remind the user to buy the app from the PICO Store. For customizations, you can set param killApp
to false
and then customize the dialog.
killApp | Determines whether the system closes the app if the user fails to pass the entitlement check. The default value is true . |