Loading...
Searching...
No Matches
AccelByte::Api::SessionBrowser Class Reference

SessionBrowser API to handle custom game session. More...

#include <AccelByteSessionBrowserApi.h>

Inheritance diagram for AccelByte::Api::SessionBrowser:

Public Member Functions

 SessionBrowser (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 SessionBrowser (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr CreateGameSession (FString const &GameMode, FString const &GameMapName, FString const &GameVersion, uint32 BotCount, uint32 MaxPlayer, TSharedPtr< FJsonObject > OtherSettings, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Create public P2P game session to Session Browser.
FAccelByteTaskWPtr CreateGameSession (FString const &GameMode, FString const &GameMapName, FString const &GameVersion, uint32 BotCount, uint32 MaxPlayer, uint32 MaxSpectator, FString const &Password, TSharedPtr< FJsonObject > OtherSettings, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Create private P2P game session to Session Browser.
FAccelByteTaskWPtr CreateGameSession (FString const &SessionTypeString, FString const &GameMode, FString const &GameMapName, FString const &GameVersion, uint32 BotCount, uint32 MaxPlayer, uint32 MaxSpectator, FString const &Password, TSharedPtr< FJsonObject > OtherSettings, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Create custom game session to Session Browser specified by the type.
FAccelByteTaskWPtr CreateGameSession (EAccelByteSessionType SessionType, FString const &GameMode, FString const &GameMapName, FString const &GameVersion, uint32 BotCount, uint32 MaxPlayer, uint32 MaxSpectator, FString const &Password, TSharedPtr< FJsonObject > OtherSettings, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Create custom game session to Session Browser specified by the type.
FAccelByteTaskWPtr CreateGameSession (FAccelByteModelsSessionBrowserCreateRequest const &CreateSessionRequest, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Create custom game session to Session Browser specified by the type.
FAccelByteTaskWPtr UpdateGameSession (FString const &SessionId, uint32 MaxPlayer, uint32 CurrentPlayerCount, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Update the session to Session Browser. Current player count can not be updated from update session. CurrentPlayerCount will be updated automatically when register / unregister players.
FAccelByteTaskWPtr UpdateGameSession (FString const &SessionId, uint32 MaxPlayer, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Update the session to Session Browser.
FAccelByteTaskWPtr UpdateGameSession (FString const &SessionId, FAccelByteModelsSessionBrowserUpdateRequest const &UpdateSessionRequest, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Update the session to Session Browser.
FAccelByteTaskWPtr UpdateGameSettings (FString const &SessionId, TMap< FString, FString > Settings, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Update the session to Session Browser.
FAccelByteTaskWPtr UpdateGameSettings (FString const &SessionId, TSharedPtr< FJsonObject > Settings, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Update the session to Session Browser.
FAccelByteTaskWPtr RemoveGameSession (FString const &SessionId, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Remove the session to Session Browser.
FAccelByteTaskWPtr GetGameSessions (FString const &SessionTypeString, FString const &GameMode, THandler< FAccelByteModelsSessionBrowserGetResult > const &OnSuccess, FErrorHandler const &OnError, uint32 Offset=0, uint32 Limit=10)
 Query game session.
FAccelByteTaskWPtr GetGameSessions (EAccelByteSessionType SessionType, FString const &GameMode, THandler< FAccelByteModelsSessionBrowserGetResult > const &OnSuccess, FErrorHandler const &OnError, uint32 Offset=0, uint32 Limit=10)
 Query game session.
FAccelByteTaskWPtr GetGameSessions (FString const &SessionTypeString, FString const &GameMode, FString const &MatchExist, THandler< FAccelByteModelsSessionBrowserGetResult > const &OnSuccess, FErrorHandler const &OnError, uint32 Offset=0, uint32 Limit=10)
 Query game session.
FAccelByteTaskWPtr GetGameSessions (EAccelByteSessionType SessionType, FString const &GameMode, FString const &MatchExist, THandler< FAccelByteModelsSessionBrowserGetResult > const &OnSuccess, FErrorHandler const &OnError, uint32 Offset=0, uint32 Limit=10)
 Query game session.
FAccelByteTaskWPtr GetGameSessionsByUserIds (const TArray< FString > &UserIds, THandler< FAccelByteModelsSessionBrowserGetByUserIdsResult > const &OnSuccess, FErrorHandler const &OnError)
 Query game session by user ids.
FAccelByteTaskWPtr RegisterPlayer (FString const &SessionId, FString const &PlayerToAdd, bool AsSpectator, THandler< FAccelByteModelsSessionBrowserAddPlayerResponse > const &OnSuccess, FErrorHandler const &OnError)
 RegisterPlayer to game session.
FAccelByteTaskWPtr UnregisterPlayer (FString const &SessionId, FString const &PlayerToRemove, THandler< FAccelByteModelsSessionBrowserAddPlayerResponse > const &OnSuccess, FErrorHandler const &OnError)
 RegisterPlayer to game session.
FAccelByteTaskWPtr GetRecentPlayer (FString const &UserId, THandler< FAccelByteModelsSessionBrowserRecentPlayerGetResult > const &OnSuccess, FErrorHandler const &OnError, uint32 Offset=0, uint32 Limit=10)
 GetRecentPlayer to game session.
FAccelByteTaskWPtr JoinSession (FString const &SessionId, FString const &Password, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 JoinSession to game session.
FAccelByteTaskWPtr GetGameSession (FString const &SessionId, THandler< FAccelByteModelsSessionBrowserData > const &OnSuccess, FErrorHandler const &OnError)
 Get game session data by session ID.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

SessionBrowser API to handle custom game session.

Member Function Documentation

◆ CreateGameSession() [1/5]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::CreateGameSession ( EAccelByteSessionType SessionType,
FString const & GameMode,
FString const & GameMapName,
FString const & GameVersion,
uint32 BotCount,
uint32 MaxPlayer,
uint32 MaxSpectator,
FString const & Password,
TSharedPtr< FJsonObject > OtherSettings,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Create custom game session to Session Browser specified by the type.

Parameters
SessionTypetype of the session: p2p or dedicated
GameModegame mode of the game.
GameMapNamemap of the game.
GameVersionversion of the played game.
BotCountnumber of bot.
MaxPlayermaximum number of player can join the session.
Passwordpassword of the game session
MaxSpectatormaximum of spectator
OtherSettingsother setting in json format
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ CreateGameSession() [2/5]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::CreateGameSession ( FAccelByteModelsSessionBrowserCreateRequest const & CreateSessionRequest,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Create custom game session to Session Browser specified by the type.

Parameters
CreateSessionRequestcreate session parameters.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ CreateGameSession() [3/5]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::CreateGameSession ( FString const & GameMode,
FString const & GameMapName,
FString const & GameVersion,
uint32 BotCount,
uint32 MaxPlayer,
TSharedPtr< FJsonObject > OtherSettings,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Create public P2P game session to Session Browser.

Parameters
GameModegame mode of the game.
GameMapNamemap of the game.
GameVersionversion of the played game.
BotCountnumber of bot.
MaxPlayermaximum number of player can join the session.
OtherSettingsother setting in json format
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ CreateGameSession() [4/5]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::CreateGameSession ( FString const & GameMode,
FString const & GameMapName,
FString const & GameVersion,
uint32 BotCount,
uint32 MaxPlayer,
uint32 MaxSpectator,
FString const & Password,
TSharedPtr< FJsonObject > OtherSettings,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Create private P2P game session to Session Browser.

Parameters
GameModegame mode of the game.
GameMapNamemap of the game.
GameVersionversion of the played game.
BotCountnumber of bot.
MaxPlayermaximum number of player can join the session.
Passwordpassword of the game session
MaxSpectatormaximum of spectator
OtherSettingsother setting in json format
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ CreateGameSession() [5/5]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::CreateGameSession ( FString const & SessionTypeString,
FString const & GameMode,
FString const & GameMapName,
FString const & GameVersion,
uint32 BotCount,
uint32 MaxPlayer,
uint32 MaxSpectator,
FString const & Password,
TSharedPtr< FJsonObject > OtherSettings,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Create custom game session to Session Browser specified by the type.

Parameters
SessionTypeStringtype of the session: p2p or dedicated
GameModegame mode of the game.
GameMapNamemap of the game.
GameVersionversion of the played game.
BotCountnumber of bot.
MaxPlayermaximum number of player can join the session.
Passwordpassword of the game session
MaxSpectatormaximum of spectator
OtherSettingsother setting in json format
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameSession()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetGameSession ( FString const & SessionId,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Get game session data by session ID.

Parameters
SessionIdid of the session
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameSessions() [1/4]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetGameSessions ( EAccelByteSessionType SessionType,
FString const & GameMode,
FString const & MatchExist,
THandler< FAccelByteModelsSessionBrowserGetResult > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Offset = 0,
uint32 Limit = 10 )

Query game session.

Parameters
SessionTypethe session type, either "dedicated", opr "p2p".
GameModethe game mode of the session to query.
MatchExistvalue will be true, false or empty
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserGetResult.
OnErrorThis will be called when the operation failed.
Offsetoffset of the query
Limitnumber of data to return
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameSessions() [2/4]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetGameSessions ( EAccelByteSessionType SessionType,
FString const & GameMode,
THandler< FAccelByteModelsSessionBrowserGetResult > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Offset = 0,
uint32 Limit = 10 )

Query game session.

Parameters
SessionTypethe session type, either "dedicated", opr "p2p".
GameModethe game mode of the session to query.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserGetResult.
OnErrorThis will be called when the operation failed.
Offsetoffset of the query
Limitnumber of data to return
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameSessions() [3/4]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetGameSessions ( FString const & SessionTypeString,
FString const & GameMode,
FString const & MatchExist,
THandler< FAccelByteModelsSessionBrowserGetResult > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Offset = 0,
uint32 Limit = 10 )

Query game session.

Parameters
SessionTypeStringthe session type, either "dedicated", opr "p2p".
GameModethe game mode of the session to query.
MatchExistvalue will be true, false or empty
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserGetResult.
OnErrorThis will be called when the operation failed.
Offsetoffset of the query
Limitnumber of data to return
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameSessions() [4/4]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetGameSessions ( FString const & SessionTypeString,
FString const & GameMode,
THandler< FAccelByteModelsSessionBrowserGetResult > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Offset = 0,
uint32 Limit = 10 )

Query game session.

Parameters
SessionTypeStringthe session type, either "dedicated", opr "p2p".
GameModethe game mode of the session to query.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserGetResult.
OnErrorThis will be called when the operation failed.
Offsetoffset of the query
Limitnumber of data to return
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameSessionsByUserIds()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetGameSessionsByUserIds ( const TArray< FString > & UserIds,
THandler< FAccelByteModelsSessionBrowserGetByUserIdsResult > const & OnSuccess,
FErrorHandler const & OnError )

Query game session by user ids.

Parameters
UserIdsList of user id
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserGetByUserIdsResult.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetRecentPlayer()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::GetRecentPlayer ( FString const & UserId,
THandler< FAccelByteModelsSessionBrowserRecentPlayerGetResult > const & OnSuccess,
FErrorHandler const & OnError,
uint32 Offset = 0,
uint32 Limit = 10 )

GetRecentPlayer to game session.

Parameters
UserIdid of the user
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserRecentPlayerGetResult.
OnErrorThis will be called when the operation failed.
Offsetoffset of the query
Limitnumber of data to return
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ JoinSession()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::JoinSession ( FString const & SessionId,
FString const & Password,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

JoinSession to game session.

Parameters
SessionIdid of the session
Passwordpassword to join if required
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ RegisterPlayer()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::RegisterPlayer ( FString const & SessionId,
FString const & PlayerToAdd,
bool AsSpectator,
THandler< FAccelByteModelsSessionBrowserAddPlayerResponse > const & OnSuccess,
FErrorHandler const & OnError )

RegisterPlayer to game session.

Parameters
SessionIdid of the session
PlayerToAddplayer to add
AsSpectatorindicates as spectator
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserAddPlayerResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ RemoveGameSession()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::RemoveGameSession ( FString const & SessionId,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Remove the session to Session Browser.

Parameters
SessionIdid of the session want to update.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UnregisterPlayer()

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::UnregisterPlayer ( FString const & SessionId,
FString const & PlayerToRemove,
THandler< FAccelByteModelsSessionBrowserAddPlayerResponse > const & OnSuccess,
FErrorHandler const & OnError )

RegisterPlayer to game session.

Parameters
SessionIdid of the session
PlayerToRemoveplayer to remove from game session
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserAddPlayerResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateGameSession() [1/3]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::UpdateGameSession ( FString const & SessionId,
FAccelByteModelsSessionBrowserUpdateRequest const & UpdateSessionRequest,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Update the session to Session Browser.

Parameters
SessionIdid of the session want to update.
UpdateSessionRequestupdate session parameters.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateGameSession() [2/3]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::UpdateGameSession ( FString const & SessionId,
uint32 MaxPlayer,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Update the session to Session Browser.

Parameters
SessionIdid of the session want to update.
MaxPlayermaximum number of player can join the session.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateGameSession() [3/3]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::UpdateGameSession ( FString const & SessionId,
uint32 MaxPlayer,
uint32 CurrentPlayerCount,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Update the session to Session Browser. Current player count can not be updated from update session. CurrentPlayerCount will be updated automatically when register / unregister players.

Parameters
SessionIdid of the session want to update.
CurrentPlayerCountcurrent number of player in the session.
MaxPlayermaximum number of player can join the session.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateGameSettings() [1/2]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::UpdateGameSettings ( FString const & SessionId,
TMap< FString, FString > Settings,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Update the session to Session Browser.

Parameters
SessionIdid of the session want to update.
Settingsupdate settings parameters.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateGameSettings() [2/2]

FAccelByteTaskWPtr AccelByte::Api::SessionBrowser::UpdateGameSettings ( FString const & SessionId,
TSharedPtr< FJsonObject > Settings,
THandler< FAccelByteModelsSessionBrowserData > const & OnSuccess,
FErrorHandler const & OnError )

Update the session to Session Browser.

Parameters
SessionIdid of the session want to update.
Settingsupdate settings parameters.
OnSuccessThis will be called when the operation succeeded. The result is FAccelByteModelsSessionBrowserData.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.