EGDL2 2.1
Loading...
Searching...
No Matches
Enablegames.EnableAPI Class Reference

The EnableAPI class provides access to the API services of the Enablegames platform. More...

Inherits MonoBehaviour.

Public Member Functions

bool HasParameter (string paramName)
 Returns a boolean indicating whether the given parameter exists in the parameters dictionary.
 
string GetParameter (string paramName)
 Gets the value of the specified parameter from the parameters dictionary.
 
Dictionary< string, string > GetAllParameters ()
 returns a refrence to the parameters object within this class
 
void SocketOpen (SocketIOEvent e)
 Method to handle the event of the socket being opened.
 
void SocketError (SocketIOEvent e)
 Represents an error received from the SocketIO component.
 
void SocketNewObject (SocketIOEvent e)
 Invoked when a new object is received from the socket.
 
void SocketClose (SocketIOEvent e)
 Handles the event when the socket closes.
 
void Authenticate (string username, string password, string game, Action externalCallback=null)
 Authenticates a user with the EnableAPI service using the provided username and password.
 
void CreateNewSession (string game, string version)
 Creates a new session for a game with the specified parameters.
 
void PushSessionData (string serializedData)
 Pushes the serialized session data to the server.
 
void GetGameParameters (string gameName, string phase)
 Retrieves the game parameters for a specific game and phase.
 
void GetSchemaExtents (string schemaID, Action< bool, Dictionary< string, float > > SetExtents)
 Retrieves the extents of a specific schema from the server.
 
void SetSchemaExtents (string schemaID, Dictionary< string, object > values)
 Sets the schema extents for a given schema ID with the provided values.
 

Static Public Member Functions

static string GetTimestamp ()
 Gets the current timestamp in ISO 8601 format.
 

Detailed Description

The EnableAPI class provides access to the API services of the Enablegames platform.

This class provides functionalities to authenticate users, create new sessions, push session data, get game parameters, get and set schema extents, and retrieve the current timestamp.

Member Function Documentation

◆ Authenticate()

void Enablegames.EnableAPI.Authenticate ( string username,
string password,
string game,
Action externalCallback = null )
inline

Authenticates a user with the EnableAPI service using the provided username and password.

Parameters
usernameThe username to authenticate with.
passwordThe password to authenticate with.
gameThe name of the game to authenticate for.
externalCallbackAn optional callback function to be called after the authentication process is complete.
Here is the call graph for this function:

◆ CreateNewSession()

void Enablegames.EnableAPI.CreateNewSession ( string game,
string version )
inline

Creates a new session for a game with the specified parameters.

Parameters
gameThe name of the game.
versionThe version of the game.
Here is the call graph for this function:

◆ GetGameParameters()

void Enablegames.EnableAPI.GetGameParameters ( string gameName,
string phase )
inline

Retrieves the game parameters for a specific game and phase.

Parameters
gameNameThe name of the game.
phaseThe phase of the game.
Here is the caller graph for this function:

◆ GetParameter()

string Enablegames.EnableAPI.GetParameter ( string paramName)
inline

Gets the value of the specified parameter from the parameters dictionary.

Parameters
paramNameThe name of the parameter to get the value of.
Returns
The value of the parameter as a string. If the parameter doesn't exist, returns an empty string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSchemaExtents()

void Enablegames.EnableAPI.GetSchemaExtents ( string schemaID,
Action< bool, Dictionary< string, float > > SetExtents )
inline

Retrieves the extents of a specific schema from the server.

Parameters
schemaIDThe ID of the schema to retrieve the extents for.
SetExtentsThe callback function to be called with the retrieved extents.

◆ GetTimestamp()

static string Enablegames.EnableAPI.GetTimestamp ( )
inlinestatic

Gets the current timestamp in ISO 8601 format.

Returns
The current timestamp.
Here is the caller graph for this function:

◆ HasParameter()

bool Enablegames.EnableAPI.HasParameter ( string paramName)
inline

Returns a boolean indicating whether the given parameter exists in the parameters dictionary.

Parameters
paramNameThe name of the parameter to check.
Returns
True if the parameter exists, otherwise false.
Here is the caller graph for this function:

◆ PushSessionData()

void Enablegames.EnableAPI.PushSessionData ( string serializedData)
inline

Pushes the serialized session data to the server.

Parameters
serializedDataThe serialized session data to be pushed.

◆ SetSchemaExtents()

void Enablegames.EnableAPI.SetSchemaExtents ( string schemaID,
Dictionary< string, object > values )
inline

Sets the schema extents for a given schema ID with the provided values.

Parameters
schemaIDThe ID of the schema to set extents for.
valuesA dictionary containing the values for the schema extents.
Here is the caller graph for this function:

◆ SocketClose()

void Enablegames.EnableAPI.SocketClose ( SocketIOEvent e)
inline

Handles the event when the socket closes.

Parameters
eThe SocketIOEvent object containing information about the event.
Here is the call graph for this function:

◆ SocketError()

void Enablegames.EnableAPI.SocketError ( SocketIOEvent e)
inline

Represents an error received from the SocketIO component.

Parameters
eThe SocketIOEvent object that contains information about the error.

◆ SocketNewObject()

void Enablegames.EnableAPI.SocketNewObject ( SocketIOEvent e)
inline

Invoked when a new object is received from the socket.

Parameters
eThe event containing the data of the new object.
Here is the call graph for this function:

◆ SocketOpen()

void Enablegames.EnableAPI.SocketOpen ( SocketIOEvent e)
inline

Method to handle the event of the socket being opened.

Parameters
eThe SocketIOEvent object representing the event.
Here is the call graph for this function:

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