Omni One Unreal SDK 1.1.0
The Omni One Unreal SDK allows for games to interface with the Omni platform service.
Loading...
Searching...
No Matches
FOmniUserService

Description

Service that accesses information about users and their relations.

The User Service is able to access user profile data for the logged-in user, their friends and other users. Also allows the logged in user to initiate a friend request.

#include <OmniUserService.h>

Inherits FOmniPlatformServiceBase.

Public Member Functions

bool GetLoginUser (const FGetOmniUserDelegate &InGetUserInfoCallback) const
 Retrieves information about the logged in user.
 
bool GetUserInfo (const FString &UserId, const FGetOmniUserDelegate &InGetUserInfoCallback) const
 Retrieves information about the user with the provided user ID.
 
bool GetAccessToken (const FGetAccessTokenDelegate &InGetAccessTokenCallback) const
 Retrieves the game-scoped access token of the logged in user.
 
bool GetUserFriends (const FGetOmniUserFriendsDelegate &InGetUserFriendsCallback)
 Retrieves information about the logged in user's friends, up to 100 entries.
 
bool GetNextUserPage (UOmniUserArray *CurrentArray, const FGetOmniUserFriendsDelegate &InGetUserFriendsCallback)
 Retrieves a subsequent page of user information for the logged in users friends, up to 100 entries.
 
bool GetUserRelations (TArray< FString > UserIds, const FGetUserRelationDelegate &InGetUserRelationsCallback) const
 Retrieves user relation data for the logged in user and the array of user Ids provided.
 
bool LaunchFriendRequestFlow (const FString &UserId, const FLaunchFriendRequestDelegate &OnLaunchFriendRequestResultCallback) const
 Launch a dialog to allow the user to send a friend request.
 
void EntitlementCheck (const FIsEntitledDelegate &InEntitlementCheckCallback, const FString &EntitlementKey)
 Performs an entitlement check.
 

Methods

◆ EntitlementCheck()

void FOmniUserService::EntitlementCheck ( const FIsEntitledDelegate &  InEntitlementCheckCallback,
const FString &  EntitlementKey 
)

Performs an entitlement check.

Parameters
InEntitlementCheckCallbackA callback that will be executed when the service has retrieved the information. bool bIsEntitled is the parameter.
EntitlementKeyEntitlement key.

◆ GetAccessToken()

bool FOmniUserService::GetAccessToken ( const FGetAccessTokenDelegate &  InGetAccessTokenCallback) const

Retrieves the game-scoped access token of the logged in user.

Parameters
InGetAccessTokenCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, FString AccessToken are parameters.
Returns
True if the request was successfully sent, false otherwise.

◆ GetLoginUser()

bool FOmniUserService::GetLoginUser ( const FGetOmniUserDelegate &  InGetUserInfoCallback) const

Retrieves information about the logged in user.

Parameters
InGetUserInfoCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniUser* (null in error cases) are parameters.
Returns
True if the request was successfully sent, false otherwise.

◆ GetNextUserPage()

bool FOmniUserService::GetNextUserPage ( UOmniUserArray CurrentArray,
const FGetOmniUserFriendsDelegate &  InGetUserFriendsCallback 
)

Retrieves a subsequent page of user information for the logged in users friends, up to 100 entries.

Currently returns empty list if no more friends.

Parameters
CurrentArrayThe array for which to retrieve the next page of information.
InGetUserFriendsCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniUserArray* (null in error cases) are parameters.
Returns
True if the request was successfully sent, false otherwise.

◆ GetUserFriends()

bool FOmniUserService::GetUserFriends ( const FGetOmniUserFriendsDelegate &  InGetUserFriendsCallback)

Retrieves information about the logged in user's friends, up to 100 entries.

Call GetNextUserPage() to retrieve subsequent pages.

Parameters
InGetUserFriendsCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniUserArray* (null in error cases) are parameters.
Returns
True if the request was successfully sent, false otherwise.

◆ GetUserInfo()

bool FOmniUserService::GetUserInfo ( const FString &  UserId,
const FGetOmniUserDelegate &  InGetUserInfoCallback 
) const

Retrieves information about the user with the provided user ID.

Parameters
UserIdThe ID of the user to retrieve information about.
InGetUserInfoCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniUser* (null in error cases) are parameters.
Returns
True if the request was successfully sent, false otherwise.

◆ GetUserRelations()

bool FOmniUserService::GetUserRelations ( TArray< FString >  UserIds,
const FGetUserRelationDelegate &  InGetUserRelationsCallback 
) const

Retrieves user relation data for the logged in user and the array of user Ids provided.

Parameters
UserIdsThe user IDs for each user to gather relation information about.
InGetUserRelationsCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UUserRelationResult* (null in error cases) are parameters.
Returns
True if the request was successfully sent, false otherwise.

◆ LaunchFriendRequestFlow()

bool FOmniUserService::LaunchFriendRequestFlow ( const FString &  UserId,
const FLaunchFriendRequestDelegate &  OnLaunchFriendRequestResultCallback 
) const

Launch a dialog to allow the user to send a friend request.

Parameters
UserIdThe User Id for the user that the dialog will attempt to send a request to.
OnLaunchFriendRequestResultCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, bool bSent are parameters.
Returns
True if the request was successfully sent, false otherwise.