|
EGDL2 2.1
|
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. | |
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.
|
inline |
Authenticates a user with the EnableAPI service using the provided username and password.
| username | The username to authenticate with. |
| password | The password to authenticate with. |
| game | The name of the game to authenticate for. |
| externalCallback | An optional callback function to be called after the authentication process is complete. |

|
inline |
Creates a new session for a game with the specified parameters.
| game | The name of the game. |
| version | The version of the game. |

|
inline |
Retrieves the game parameters for a specific game and phase.
| gameName | The name of the game. |
| phase | The phase of the game. |

|
inline |
Gets the value of the specified parameter from the parameters dictionary.
| paramName | The name of the parameter to get the value of. |


|
inline |
Retrieves the extents of a specific schema from the server.
| schemaID | The ID of the schema to retrieve the extents for. |
| SetExtents | The callback function to be called with the retrieved extents. |
|
inlinestatic |
Gets the current timestamp in ISO 8601 format.

|
inline |
Returns a boolean indicating whether the given parameter exists in the parameters dictionary.
| paramName | The name of the parameter to check. |

|
inline |
Pushes the serialized session data to the server.
| serializedData | The serialized session data to be pushed. |
|
inline |
Sets the schema extents for a given schema ID with the provided values.
| schemaID | The ID of the schema to set extents for. |
| values | A dictionary containing the values for the schema extents. |

|
inline |
Handles the event when the socket closes.
| e | The SocketIOEvent object containing information about the event. |

|
inline |
Represents an error received from the SocketIO component.
| e | The SocketIOEvent object that contains information about the error. |
|
inline |
Invoked when a new object is received from the socket.
| e | The event containing the data of the new object. |

|
inline |
Method to handle the event of the socket being opened.
| e | The SocketIOEvent object representing the event. |
