Beamable SDK
Public Member Functions | Properties | List of all members
Beamable.Api.Sessions.ISessionService Interface Reference
Inheritance diagram for Beamable.Api.Sessions.ISessionService:
Inheritance graph
[legend]

Public Member Functions

Promise< EmptyResponseStartSession (User user, string advertisingId, string locale)
 Begin a new session for the current player. This happens automatically during the initialization of a player's BeamContext. More...
 
Promise< SessionGetHeartbeat (long gamerTag)
 Get the current Session of a player by their gamertag. More...
 
Promise< EmptyResponseSendHeartbeat ()
 Send a heartbeat for the current user's session. Sending a heartbeat prolongs the session that was started with StartSession. This method is called automatically after the IHeartbeatService.Start method has been called, which happens automatically when the BeamContext starts. More...
 

Properties

float SessionStartedAt [get]
 The number of seconds after the game startup that the session was begun.
 
float TimeSinceLastSessionStart [get]
 The number of seconds ago that the most recent session was started.
 

Member Function Documentation

◆ GetHeartbeat()

Promise< Session > Beamable.Api.Sessions.ISessionService.GetHeartbeat ( long  gamerTag)

Get the current Session of a player by their gamertag.

Parameters
gamerTagThe gamertag of the player to find the Session for.
Returns
A Promise<T> containing the player's Session

Implemented in Beamable.Api.Sessions.SessionService.

◆ SendHeartbeat()

Promise< EmptyResponse > Beamable.Api.Sessions.ISessionService.SendHeartbeat ( )

Send a heartbeat for the current user's session. Sending a heartbeat prolongs the session that was started with StartSession. This method is called automatically after the IHeartbeatService.Start method has been called, which happens automatically when the BeamContext starts.

Returns

Implemented in Beamable.Api.Sessions.SessionService.

◆ StartSession()

Promise< EmptyResponse > Beamable.Api.Sessions.ISessionService.StartSession ( User  user,
string  advertisingId,
string  locale 
)

Begin a new session for the current player. This happens automatically during the initialization of a player's BeamContext.

Parameters
userThe User that is starting a session.
advertisingIdAn advertising ID that will be included in the session stats. When the session is started, by default, the AdvertisingIdentifier.GetIdentifier is given.
localeThe language code string that the session should use.
Returns
A Promise representing the network call.

Implemented in Beamable.Api.Sessions.SessionService.


The documentation for this interface was generated from the following file: