- EzchaPlugin
- EzchaClient
- EzchaOpts
- EzchaSingleton
- EzchaUtil
- EzchaWebAdapter
- EzchaDatastoresAPI
- EzchaGamesAPI
- EzchaGeneralAPI
- EzchaLeaderboardsAPI
- EzchaNewsAPI
- EzchaProductsAPI
- EzchaRelayAPI
- EzchaSessionsAPI
- EzchaTrophiesAPI
- EzchaUsersAPI
- EzchaAPI
- EzchaAsyncBatch
- EzchaDto
- EzchaMultiplayerSpawner
- EzchaPlatformAdapter
- EzchaRelayMultiplayerPeer
- EzchaRelayPacket
- EzchaRequestBuilder
- EzchaResponse
- EzchaServerPlayer
- EzchaUploader
- EzchaWebTexture
- EzchaGame
- EzchaLeaderboard
- EzchaLeaderboardEntry
- EzchaNewsPost
- EzchaProduct
- EzchaProductPurchase
- EzchaRelayLobby
- EzchaRelayServer
- EzchaTrophy
- EzchaTrophyObtained
- EzchaUser
- EzchaCaptchaResponse
- EzchaDatastoreValueResponse
- EzchaFriendsResponse
- EzchaGameListResponse
- EzchaGameResponse
- EzchaGeneralStatusResponse
- EzchaGeneralTimeResponse
- EzchaLeaderboardEntryListResponse
- EzchaLeaderboardListResponse
- EzchaLeaderboardQueuedResponse
- EzchaLobbyListResponse
- EzchaNewsListResponse
- EzchaPaginatedResponse
- EzchaProductListResponse
- EzchaProductVerifyResponse
- EzchaRelayLobbyResponse
- EzchaRelayServerListResponse
- EzchaSessionValidationResponse
- EzchaTrophyListResponse
- EzchaTrophyObtainedListResponse
- EzchaTrophyQueuedResponse
- EzchaUserListResponse
- EzchaUserResponse
- EzchaUsersResponse
Inherits: EditorPlugin
A class for internal use.
You should never need to use this directly. The "EzchaSingleton" class is a good starting point.
Inherits: Object
A helper class to simplify Ezcha Network API integration within game clients.
This should be accessed through the "Ezcha" singleton.
| Type | Name | Default |
|---|---|---|
| EzchaUser | user | null |
| Array[EzchaTrophyObtained] | trophies_obtained | [] |
| Array[EzchaLeaderboardEntry] | leaderboard_entries | [] |
| int | tipped_amount | 0 |
| bool | moderation_tools | false |
| Returns | Name |
|---|---|
| bool | authenticate() |
| EzchaPlatformAdapter | get_adapter() |
| bool | supports_native_login() |
| bool | request_login() |
| bool | request_logout() |
| void | request_account_management() |
| bool | is_authenticated() |
| bool | is_guest() |
| String | get_session_token() |
| bool | has_trophy(String trophy_id, bool include_pending=true) |
| EzchaTrophyObtained | get_trophy(String trophy_id) |
| bool | grant_trophy(String trophy_id) |
| bool | has_score(String leaderboard_id) |
| float | get_score(String leaderboard_id, float defaults_to=0.0) |
| bool | update_score(String leaderboard_id, float score, EzchaLeaderboardsAPI.UpdateMode mode=0) |
| String | get_datastore(String key) |
| bool | set_datastore(String key, String value) |
| Array[EzchaRelayServer] | order_relay_servers() |
| EzchaRelayServer | determine_relay_server() |
| EzchaLobbyListResponse | get_relay_lobbies(int page=1, int game_mode=-1) |
authentication_completed()
Emitted when the authentication process has completed.
login_completed()
Emitted when the login flow has completed. (not support on web).
logout_completed()
Emitted when the user logs out. (not support on web).
session_expired()
Emitted if the session has expired or is otherwise no longer valid.
trophy_grant_completed()
Emitted when a trophy grant is queued from the grant_trophy function. trophy_data will be null if the grant could not be queued.
leaderboard_update_completed()
Emitted when a leaderboard update is queued from the update_score function.
datastore_value_received()
Emitted after a datastore value is requested and received.
datastore_value_posted()
Emitted after a datastore value update is posted.
EzchaUser user = null
The user who is currently playing the game. Only available after authenticating.
Array[EzchaTrophyObtained] trophies_obtained = []
The trophies that the currently authenticated user has obtained from this game.
Array[EzchaLeaderboardEntry] leaderboard_entries = []
The leaderboard entries that the currently authenticated user has for this game.
int tipped_amount = 0
The total amount that the currently authenticated user has tipped for this game. This is measured in USD cents.
bool moderation_tools = false
If true the user should have access to any moderation tools.
bool authenticate()
Authenticates and loads the information of the current player if available. This should be ran at the start of the game. The authentication_completed signal is emitted on completion. (Async) Returns true if authentication was successful.
EzchaPlatformAdapter get_adapter()
Returns the current platform adapter.
bool supports_native_login()
Returns true if the current platform allows for native login/logout.
bool request_login()
Requests the native login flow for platforms that support it. This can be ran at the user's request if automatic authentication fails. The authentication_completed signal is emitted on completion. (Async) Returns true if authentication was successful.
bool request_logout()
Requests to logout the current user for platforms that support it. The logout_completed signal is emitted on completion. (Async) Returns true if logout was successful.
void request_account_management()
Opens the account management page for platforms that support it. (Async) Returns once the user closes the page.
bool is_authenticated()
Returns true if the client has authenticated and user data is available.
bool is_guest()
Returns true if the user has a guest profile loaded from a relay lobby.
String get_session_token()
Returns the player's session token if authenticated.
bool has_trophy(String trophy_id, bool include_pending=true)
Returns true if the currently authenticated player has the trophy specified.
EzchaTrophyObtained get_trophy(String trophy_id)
Returns the trophy if the player has obtained it, null otherwise.
bool grant_trophy(String trophy_id)
Grants a trophy to the currently authenticated player. The trophy must have the "allow clients" option enabled. The trophy_grant_completed signal is emitted on completion. (Async) Returns true if the trophy grant was queued.
bool has_score(String leaderboard_id)
Checks if the currently authenticated player has a score on a leaderboard.
float get_score(String leaderboard_id, float defaults_to=0.0)
Returns the currently authenticated player's score on a specific leaderboard.
bool update_score(String leaderboard_id, float score, EzchaLeaderboardsAPI.UpdateMode mode=0)
Updates a leaderboard entry belonging to the currently authenticated player. The leaderboard must have the "allow clients" option enabled. The leaderboard_update_completed signal is emitted on completion. (Async) Returns true if the score update was queued.
String get_datastore(String key)
Get a datastore value belonging to the currently authenticated player. The datastore_value_received signal is emitted when the value is received. (Async) Returns a string value. The value will be empty if unset.
bool set_datastore(String key, String value)
Update a datastore value belonging to the currently authenticated player. Limit of 5 keys per user, limit of 16384 characters per value. Set the value to an empty string to delete the key. The datastore_value_posted signal is emitted on completion. (Async) Returns true if the value was successfully updated.
Array[EzchaRelayServer] order_relay_servers()
Test relay servers and return them based on latency. (Async) Returns an array of available servers, sorted from lowest to highest latency.
EzchaRelayServer determine_relay_server()
Determines the ideal Ezcha Relay server for the user. (Async) Returns a server if available, null otherwise.
EzchaLobbyListResponse get_relay_lobbies(int page=1, int game_mode=-1)
Fetches a list of open Ezcha Relay lobbies for the current game and version. Returns an EzchaLobbyListResponse object.
Inherits: RefCounted
A class for internal use.
You should never need to use this directly.
Inherits: Node
The class representing the "Ezcha" singleton.
This is where most of the plugin's functionality is accessed from.
| Type | Name | Default |
|---|---|---|
| EzchaClient | client | EzchaClient.new(self) |
| EzchaDatastoresAPI | datastores | EzchaDatastoresAPI.new(self) |
| EzchaGamesAPI | games | EzchaGamesAPI.new(self) |
| EzchaGeneralAPI | general | EzchaGeneralAPI.new(self) |
| EzchaLeaderboardsAPI | leaderboards | EzchaLeaderboardsAPI.new(self) |
| EzchaNewsAPI | news | EzchaNewsAPI.new(self) |
| EzchaProductsAPI | products | EzchaProductsAPI.new(self) |
| EzchaRelayAPI | relay | EzchaRelayAPI.new(self) |
| EzchaSessionsAPI | sessions | EzchaSessionsAPI.new(self) |
| EzchaTrophiesAPI | trophies | EzchaTrophiesAPI.new(self) |
| EzchaUsersAPI | users | EzchaUsersAPI.new(self) |
| Returns | Name |
|---|---|
| String | get_game_id() |
| String | get_api_key() |
| String | get_signing_key() |
EzchaClient client = EzchaClient.new(self)
A helper class to simplify Ezcha Network API integration within game clients.
EzchaDatastoresAPI datastores = EzchaDatastoresAPI.new(self)
A wrapper for the datastores section of the API.
EzchaGamesAPI games = EzchaGamesAPI.new(self)
A wrapper for the games section of the API.
EzchaGeneralAPI general = EzchaGeneralAPI.new(self)
A wrapper for the general section of the API.
EzchaLeaderboardsAPI leaderboards = EzchaLeaderboardsAPI.new(self)
A wrapper for the leaderboards section of the API.
EzchaNewsAPI news = EzchaNewsAPI.new(self)
A wrapper for the news section of the API.
EzchaProductsAPI products = EzchaProductsAPI.new(self)
A wrapper for the products section of the API.
EzchaRelayAPI relay = EzchaRelayAPI.new(self)
A wrapper for the relay section of the API.
EzchaSessionsAPI sessions = EzchaSessionsAPI.new(self)
A wrapper for the sessions section of the API.
EzchaTrophiesAPI trophies = EzchaTrophiesAPI.new(self)
A wrapper for the trophies section of the API.
EzchaUsersAPI users = EzchaUsersAPI.new(self)
A wrapper for the users section of the API.
String get_game_id()
A helper to return the currently configured game identifier.
String get_api_key()
A helper to return the currently configured API key.
String get_signing_key()
A helper to return the currently configured signing key.
Inherits: Object
Common utilities used across the plugin.
| Returns | Name |
|---|---|
| String | get_game_version() static |
| String | get_start_argument(String key) static |
| Variant | unpack_data(Object target, Dictionary data, _UnpackState state=null) static |
String get_game_version()
Returns the version as defined in the project settings.
String get_start_argument(String key)
Parse a start argument depending on the platform. Ezcha Network will pass the following URL query parameters as arguments: level, lobby, map, world
Variant unpack_data(Object target, Dictionary data, _UnpackState state=null)
Unpacks values from a dictionary to an object.
Inherits: EzchaPlatformAdapter
A class to handle web specific logic.
| Returns | Name |
|---|---|
| void | register_redirect() |
| void | login_redirect() |
| void | close_prompts() |
| bool | avatar_prompt(Image avatar) |
| String | captcha_prompt() |
| bool | interstitial_ad_prompt() |
| bool | rewarded_ad_prompt() |
| String | purchase_product_prompt(String product_id) |
avatar_prompt_completed()
Emitted once the avatar prompt is completed.
captcha_prompt_completed()
Emitted once the captcha prompt is completed.
ad_prompt_completed()
Emitted once the rewarded ad prompt is completed.
purchase_prompt_completed()
Emitted once the product purchase prompt is completed.
Redirects to the register page and back.
Redirects to the login page and back.
Closes all web embed prompts.
bool avatar_prompt(Image avatar)
Prompts the user to change their avatar. The provided image must be 256x256px. (Async) Returns true if user accepts and the upload is successful.
String captcha_prompt()
Prompts the user to solve a captcha. The response must be validated via the API. (Async) Returns the response if successful, otherwise an empty string.
bool interstitial_ad_prompt()
Shows the user an interstitial video advertisment. (Async) Returns the true if an advertisment was displayed.
bool rewarded_ad_prompt()
Shows the user a rewarded video advertisment. (Async) Returns the true if the player should be rewarded.
String purchase_product_prompt(String product_id)
Shows the user the purchase prompt for the specified product. Verification/consumption of the product should be completed afterwards. (Async) Returns the purchase ID if the player completed the purchase, otherwise an empty string.
Inherits: EzchaAPI
A wrapper for the datastores section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaDatastoreValueResponse | get_client(String key, String session_token) |
| EzchaResponse | post_client(String key, String value, String session_token) |
| EzchaDatastoreValueResponse | get_server(String user_id, String key) |
| EzchaResponse | post_server(String user_id, String key, String value) |
EzchaDatastoreValueResponse get_client(String key, String session_token)
Requests the value of a client-side datastore from its key.
EzchaResponse post_client(String key, String value, String session_token)
Updates the value of a client-side datastore by its key.
EzchaDatastoreValueResponse get_server(String user_id, String key)
Requests the value of a server-side datastore for a player from its key.
EzchaResponse post_server(String user_id, String key, String value)
Updates the value of a server-side datastore for a player by its key.
Inherits: EzchaAPI
A wrapper for the games section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaGameResponse | get_from_id(String game_id) |
| EzchaGameResponse | get_from_slug(String game_slug) |
| EzchaGameListResponse | get_many(PackedStringArray game_ids, PackedStringArray game_slugs=null) |
| EzchaGameResponse | get_random(bool include_exclusives=false) |
| EzchaGameResponse | get_game_of_the_day() |
| EzchaTrophyListResponse | get_trophies(String game_id, String session_token="") |
| EzchaLeaderboardListResponse | get_leaderboards(String game_id, String session_token="") |
| EzchaProductListResponse | get_products(String game_id, String session_token="") |
EzchaGameResponse get_from_id(String game_id)
Requests a game from its ID.
EzchaGameResponse get_from_slug(String game_slug)
Requests a game from its slug.
EzchaGameListResponse get_many(PackedStringArray game_ids, PackedStringArray game_slugs=null)
Requests several games at once.
EzchaGameResponse get_random(bool include_exclusives=false)
Requests a randomly chosen game.
EzchaGameResponse get_game_of_the_day()
Requests the current game of the day.
EzchaTrophyListResponse get_trophies(String game_id, String session_token="")
Requests the trophies belonging to a game. A session with sufficient permissions can be provided to include unlisted trophies, but is not required.
EzchaLeaderboardListResponse get_leaderboards(String game_id, String session_token="")
Requests the leaderboards belonging to a game. A session with sufficient permissions can be provided to include unlisted leaderboards, but is not required.
EzchaProductListResponse get_products(String game_id, String session_token="")
Requests the products belonging to a game. A session with sufficient permissions can be provided to include unlisted products, but is not required.
Inherits: EzchaAPI
A wrapper for the general section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaGeneralStatusResponse | get_status() |
| EzchaGeneralTimeResponse | get_time() |
| EzchaCaptchaResponse | post_captcha(String response) |
EzchaGeneralStatusResponse get_status()
Returns the current status of the API.
EzchaGeneralTimeResponse get_time()
Returns the current time from API.
EzchaCaptchaResponse post_captcha(String response)
Validates a captcha response.
Inherits: EzchaAPI
A wrapper for the leaderboards section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaLeaderboardEntryListResponse | get_entries(String leaderboard_id, int page=1, int items_per_page=-1, String session_token="") |
| EzchaLeaderboardQueuedResponse | post_entry_client(String leaderboard_id, String session_token, float score, EzchaLeaderboardsAPI.UpdateMode mode=0) |
| EzchaLeaderboardQueuedResponse | post_entry_server(String leaderboard_id, String user_id, float score, EzchaLeaderboardsAPI.UpdateMode mode=0) |
enum UpdateMode:
- UpdateMode SET = 0
- UpdateMode ADD = 1
- UpdateMode SUBTRACT = 2
EzchaLeaderboardEntryListResponse get_entries(String leaderboard_id, int page=1, int items_per_page=-1, String session_token="")
Returns a paginated list of entries for a specific leaderboard. A session token is only required when attempting to access an unlisted leaderboard.
EzchaLeaderboardQueuedResponse post_entry_client(String leaderboard_id, String session_token, float score, EzchaLeaderboardsAPI.UpdateMode mode=0)
Updates a score from a game client using a session token. Requires a signing key to be configured.
EzchaLeaderboardQueuedResponse post_entry_server(String leaderboard_id, String user_id, float score, EzchaLeaderboardsAPI.UpdateMode mode=0)
Updates a score from a game server using an API key. Requires an API key to be configured.
Inherits: EzchaAPI
A wrapper for the news section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaNewsListResponse | get_list(int page=1, String category="", String series="", String order="") |
EzchaNewsListResponse get_list(int page=1, String category="", String series="", String order="")
Returns a paginated list of news posts based on the criteria provided.
Inherits: EzchaAPI
A wrapper for the products section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaProductVerifyResponse | post_verify_client(String purchase_id, bool consume, String session_token) |
| EzchaProductVerifyResponse | post_verify_server(String purchase_id, bool consume, String user_id) |
EzchaProductVerifyResponse post_verify_client(String purchase_id, bool consume, String session_token)
Verifies and optionally consumes a product purchase client-side.
EzchaProductVerifyResponse post_verify_server(String purchase_id, bool consume, String user_id)
Verifies and optionally consumes a product purchase server-side.
Inherits: EzchaAPI
A wrapper for the relay section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaRelayServerListResponse | get_servers() |
| EzchaLobbyListResponse | get_lobbies(String game_id, int page=1, String version="", int game_mode=-1, String region="", String server_id="") |
| EzchaRelayLobbyResponse | resolve_lobby(String game_id, String join_code) |
EzchaRelayServerListResponse get_servers()
Returns a list of available relay servers.
EzchaLobbyListResponse get_lobbies(String game_id, int page=1, String version="", int game_mode=-1, String region="", String server_id="")
Returns a list of available public lobbies.
EzchaRelayLobbyResponse resolve_lobby(String game_id, String join_code)
Resolves a lobby from its join code.
Inherits: EzchaAPI
A wrapper for the sessions section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaSessionValidationResponse | post_validation(String session_token="", String game_id="") |
EzchaSessionValidationResponse post_validation(String session_token="", String game_id="")
Validates a session token and returns user information related to the current game.
Inherits: EzchaAPI
A wrapper for the trophies section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaTrophyQueuedResponse | post_grant_client(String trophy_id, String session_token) |
| EzchaTrophyQueuedResponse | post_grant_server(String trophy_id, String user_id) |
EzchaTrophyQueuedResponse post_grant_client(String trophy_id, String session_token)
Grant a trophy from a game client using a session token. Requires a signing key to be configured.
EzchaTrophyQueuedResponse post_grant_server(String trophy_id, String user_id)
Grant a trophy from a game server using an API key. Requires an API key to be configured.
Inherits: EzchaAPI
A wrapper for the users section of the API.
This should be accessed through the "Ezcha" singleton.
| Returns | Name |
|---|---|
| EzchaUserResponse | get_from_id(String user_id) |
| EzchaUserResponse | get_from_name(String username) |
| EzchaUsersResponse | get_many(PackedStringArray user_ids, PackedStringArray usernames=null) |
| EzchaUserListResponse | get_list(int page=1, String category="", String order="") |
| EzchaTrophyObtainedListResponse | get_trophies(String user_id, String game_id) |
| EzchaFriendsResponse | check_friends(String user_id_a, String user_id_b) |
EzchaUserResponse get_from_id(String user_id)
Requests a user from their ID.
EzchaUserResponse get_from_name(String username)
Requests a user from their name.
EzchaUsersResponse get_many(PackedStringArray user_ids, PackedStringArray usernames=null)
Requests several users at once.
EzchaUserListResponse get_list(int page=1, String category="", String order="")
Returns a paginated list of user based on the criteria provided.
EzchaTrophyObtainedListResponse get_trophies(String user_id, String game_id)
Lists the trophies a user has obtained for the specified game.
EzchaFriendsResponse check_friends(String user_id_a, String user_id_b)
Check if two users are friends.
Inherits: RefCounted
Inherited By: EzchaDatastoresAPI, EzchaGamesAPI, EzchaGeneralAPI, EzchaLeaderboardsAPI, EzchaNewsAPI, EzchaProductsAPI, EzchaRelayAPI, EzchaSessionsAPI, EzchaTrophiesAPI, EzchaUsersAPI
A base class for handling calls to the Ezcha Network API.
Inherits: RefCounted
A helper class to batch and watch multiple asynchronous coroutines.
Tracks return values and emits a signal once all coroutines have completed. Provides its own async function that can be used to block execution.
| Returns | Name |
|---|---|
| EzchaAsyncBatch | add(Callable coroutine, Array args=null) |
| int | count() |
| int | count_pending() |
| int | count_completed() |
| bool | is_completed() |
| bool | is_processing() |
| Array | get_results() |
| Array | watch() |
EzchaAsyncBatch add(Callable coroutine, Array args=null)
Add a coroutine to the batch.
int count()
Returns how many coroutines have been added.
int count_pending()
Returns how many coroutines are still pending.
int count_completed()
Returns how many coroutines have been completed.
bool is_completed()
Returns true if all coroutines have completed.
bool is_processing()
Returns true if any coroutines are processing.
Array get_results()
Returns the values returned from the coroutines. A value will be null if the coroutine is either pending or void. These will be in the same order as the corresponding coroutines were added.
Array watch()
Starts and watches all coroutines, waiting until each one is completed. (Async) Returns an array of coroutine results in the same order as they were added.
Inherits: RefCounted
Inherited By: EzchaGame, EzchaLeaderboard, EzchaLeaderboardEntry, EzchaNewsPost, EzchaProduct, EzchaProductPurchase, EzchaRelayLobby, EzchaRelayServer, EzchaTrophy, EzchaUser
A base class for handling data returned by the Ezcha Network API.
Inherits: MultiplayerSpawner
Extended MultiplayerSpawner that supports Ezcha Relay host migration. Works with other built-in multiplayer peers.
Inherits: RefCounted
Inherited By: EzchaWebAdapter
A class for internal use.
Handles platform specific logic.
| Returns | Name |
|---|---|
| bool | supports_login() |
auth_flow_completed()
login_flow_completed()
logout_completed()
session_expired()
Inherits: MultiplayerPeerExtension
A lobby based MultiplayerPeer implementation which uses Ezcha Relay for networking.
| Returns | Name |
|---|---|
| void | resolve_lobby(String join_code) |
| void | join_lobby(EzchaRelayLobby lobby) |
| void | create_lobby(EzchaRelayServer server, String name, int players, int game_mode=0, EzchaRelayMultiplayerPeer.Visibility visibility=0, bool host_migration=false) |
| void | kick(int peer_id, String message="") |
| void | ban(int peer_id, String message="") |
| String | get_lobby_id() |
| String | get_join_code() |
| String | get_lobby_name() |
| int | get_game_mode() |
| int | get_player_limit() |
| EzchaRelayMultiplayerPeer.Visibility | get_visibility_mode() |
| int | get_host_id() |
| Array[int] | get_peers() |
| EzchaUser | get_user(int peer_id) |
| EzchaRelayMultiplayerPeer.Operation | get_operation() |
| void | set_lobby_name(String new_name) |
| void | set_game_mode(int new_mode) |
| void | set_player_limit(int new_limit) |
| void | set_visibility(EzchaRelayMultiplayerPeer.Visibility new_visibility) |
| void | migrate_host(int peer_id) |
| void | close_lobby(String message="") |
| bool | in_lobby() |
| bool | is_host() |
| bool | can_modify_lobby() |
lobby_connected()
Emitted after connecting to a lobby.
lobby_created()
Emitted after creating a new lobby.
lobby_joined()
Emitted after joining an existing lobby.
user_connected()
Emitted when a peer joins the lobby. Mirrors peer_connected but includes user data and emits upon lobby creation.
user_disconnected()
Emitted when a peer leaves the lobby. Mirrors peer_disconnected but includes user data.
name_changed()
Emitted when the name of the lobby changes.
game_mode_changed()
Emitted when the current game mode changes.
player_limit_changed()
Emitted when the player limit changes.
visibility_changed()
Emitted when visibility of the lobby changes.
host_migrated()
Emitted when the lobby migrates hosts to a new peer.
error()
Emitted when an error occurs during relay operations.
kicked()
Emitted when kicked from the lobby.
enum ErrorCode:
- ErrorCode CLIENT_EXCEPTION = -1
- ErrorCode INVALID_REQUEST = 100
- ErrorCode NO_PERMISSION = 101
- ErrorCode RATE_LIMIT = 102
- ErrorCode UNSUPPORTED_PROTOCOL = 200
- ErrorCode AUTH_FAILED = 201
- ErrorCode SERVER_MAX_CAPACITY = 202
- ErrorCode LOBBY_NOT_FOUND = 300
- ErrorCode GAME_ID_MISMATCH = 310
- ErrorCode VERSION_MISMATCH = 311
- ErrorCode LOBBY_FULL = 320
- ErrorCode NOT_FRIENDS = 321
- ErrorCode REFUSING_CONNECTIONS = 322
- ErrorCode BANNED = 323
- ErrorCode LOBBY_LIMIT_REACHED = 400
- ErrorCode KICKED = 500
- ErrorCode INVALID_PEER = 501
- ErrorCode INTERNAL = 900
enum Visibility:
- Visibility PUBLIC = 0
- Visibility UNLISTED = 1
- Visibility FRIENDS_ONLY = 2
enum Operation:
- Operation NONE = 0
- Operation CONNECT = 1
- Operation HANDSHAKE = 2
- Operation CREATE_LOBBY = 3
- Operation JOIN_LOBBY = 4
void resolve_lobby(String join_code)
Resolve a join code, connect to the relay server, and then join the lobby. Do not call this function with await.
void join_lobby(EzchaRelayLobby lobby)
Connect to a relay server and join a lobby. Do not call this function with await.
void create_lobby(EzchaRelayServer server, String name, int players, int game_mode=0, EzchaRelayMultiplayerPeer.Visibility visibility=0, bool host_migration=false)
Request a new lobby from the relay server. Hosting requires the user to be authenticated. Do not call this function with await.
void kick(int peer_id, String message="")
Kick another player from the lobby. (host/moderator only)
void ban(int peer_id, String message="")
Ban another player from the lobby. (host/moderator only)
String get_lobby_id()
Returns the UUID of the lobby.
String get_join_code()
Returns the join code of the lobby.
String get_lobby_name()
Returns the name of the lobby.
int get_game_mode()
Returns the game mode of the lobby.
int get_player_limit()
Returns the player limit of the lobby.
EzchaRelayMultiplayerPeer.Visibility get_visibility_mode()
Returns the visibility mode of the lobby.
int get_host_id()
Returns the peer ID of the current host.
Returns a list of connected peer IDs.
EzchaUser get_user(int peer_id)
Returns locally cached user data for a given peer ID. Prefer to use this over relaying information from the host.
EzchaRelayMultiplayerPeer.Operation get_operation()
Returns what the current pending operation is.
void set_lobby_name(String new_name)
Change the name of the lobby. (host/moderator only, requires migration to be enabled)
void set_game_mode(int new_mode)
Change the game mode of the lobby. (host/moderator only, requires migration to be enabled)
void set_player_limit(int new_limit)
Change the player limit of the lobby. (host/moderator only, requires migration to be enabled)
void set_visibility(EzchaRelayMultiplayerPeer.Visibility new_visibility)
Change the visibility of the lobby. (host/moderator only, requires migration to be enabled)
void migrate_host(int peer_id)
Manually migrate host to another peer. (host/moderator only, requires migration to be enabled)
void close_lobby(String message="")
Close the lobby and kick all players. (host/moderator only)
bool in_lobby()
Returns true if currently connected to a lobby
bool is_host()
Returns if the current peer is the host.
bool can_modify_lobby()
Returns if the current peer can modify the lobby.
Inherits: RefCounted
A class for internal use.
A class representing a packet received via Ezcha Relay. Stores engine metadata extracted from payload.
| Type | Name | Default |
|---|---|---|
| PackedByteArray | data | PackedByteArray() |
| int | from | -1 |
| MultiplayerPeer.TransferMode | transfer_mode | 2 |
| int | channel | 0 |
Inherits: RefCounted
A class for building and making requests to the Ezcha Network API.
| Returns | Name |
|---|---|
| EzchaRequestBuilder | set_hostname(String value) |
| EzchaRequestBuilder | set_endpoint(String value) |
| EzchaRequestBuilder | set_method(HTTPClient.Method value) |
| EzchaRequestBuilder | set_authentication(String token) |
| EzchaRequestBuilder | set_signing_key(String key) |
| EzchaRequestBuilder | set_parse_response(bool enabled) |
| EzchaRequestBuilder | set_response_object(EzchaResponse obj) |
| EzchaRequestBuilder | set_timeout(float time) |
| EzchaRequestBuilder | add_query_parameter(String key, Variant value) |
| EzchaRequestBuilder | add_body_data(String key, Variant value) |
| EzchaResponse | fetch() |
EzchaRequestBuilder set_hostname(String value)
Sets the target hostname.
EzchaRequestBuilder set_endpoint(String value)
Sets the target endpoint.
EzchaRequestBuilder set_method(HTTPClient.Method value)
Sets the method to be used.
EzchaRequestBuilder set_authentication(String token)
Sets the authentication header for the request.
EzchaRequestBuilder set_signing_key(String key)
Enables request signing and defines the signing key to use. Requires authentication to be set to a session token.
EzchaRequestBuilder set_parse_response(bool enabled)
Enable/disable response parsing for performance.
EzchaRequestBuilder set_response_object(EzchaResponse obj)
Set the response object.
EzchaRequestBuilder set_timeout(float time)
Set the request timeout. Defaults to 10 seconds.
EzchaRequestBuilder add_query_parameter(String key, Variant value)
Adds a parameter to the query string. The value should either be a string or an array of strings.
EzchaRequestBuilder add_body_data(String key, Variant value)
Adds a value to the body data.
EzchaResponse fetch()
Makes the request.
Inherits: RefCounted
Inherited By: EzchaCaptchaResponse, EzchaDatastoreValueResponse, EzchaFriendsResponse, EzchaGameListResponse, EzchaGameResponse, EzchaGeneralStatusResponse, EzchaGeneralTimeResponse, EzchaLeaderboardListResponse, EzchaLeaderboardQueuedResponse, EzchaPaginatedResponse, EzchaProductListResponse, EzchaProductVerifyResponse, EzchaRelayLobbyResponse, EzchaRelayServerListResponse, EzchaSessionValidationResponse, EzchaTrophyListResponse, EzchaTrophyObtainedListResponse, EzchaTrophyQueuedResponse, EzchaUserResponse, EzchaUsersResponse
The base class for handling Ezcha Network API responses.
| Returns | Name |
|---|---|
| EzchaResponse | async() |
| bool | is_successful() |
| int | get_status() |
| String | get_error() |
| bool | is_pending() |
completed()
Emitted once the response has been received and processed or upon failure.
EzchaResponse async()
(Async) Wait for the request to be completed.
bool is_successful()
Returns if the response is okay and is not an error.
int get_status()
Returns the status code.
String get_error()
Returns the error message if available.
bool is_pending()
Returns if the response is pending or not.
Inherits: RefCounted
A helper class for managing players on dedicated servers.
You shouldn't use this client-side or when making a singleplayer/relay based game. In those cases you should use Ezcha.client instead.
| Type | Name | Default |
|---|---|---|
| EzchaUser | user | null |
| Array[EzchaTrophyObtained] | trophies_obtained | [] |
| Array[EzchaLeaderboardEntry] | leaderboard_entries | [] |
| int | tipped_amount | 0 |
| bool | moderation_tools | false |
| Returns | Name |
|---|---|
| bool | authenticate(String session_token) |
| bool | is_authenticated() |
| bool | has_trophy(String trophy_id, bool include_pending=true) |
| EzchaTrophyObtained | get_trophy(String trophy_id) |
| bool | grant_trophy(String trophy_id) |
| bool | has_score(String leaderboard_id) |
| float | get_score(String leaderboard_id, float defaults_to=0.0) |
| bool | update_score(String leaderboard_id, float score, EzchaLeaderboardsAPI.UpdateMode mode=0) |
| String | get_datastore(String key) |
| bool | set_datastore(String key, String value) |
authentication_completed()
Emitted once a session token has been authenticated.
trophy_grant_completed()
Emitted when a trophy grant is queued from the grant_trophy function. trophy_data will be null if the grant could not be queued.
leaderboard_update_completed()
Emitted when a leaderboard update is queued from the update_score function.
datastore_value_received()
Emitted after a datastore value is requested and received
datastore_value_posted()
Emitted after a datastore value update is posted.
EzchaUser user = null
The user data of the player. Only available after authenticating.
Array[EzchaTrophyObtained] trophies_obtained = []
The trophies that the user has obtained from this game.
Array[EzchaLeaderboardEntry] leaderboard_entries = []
The leaderboard entries that the currently authenticated user has for this game.
int tipped_amount = 0
The total amount that the currently authenticated user has tipped for this game. This is measured in USD cents.
bool moderation_tools = false
If true the user should have access to any moderation tools.
bool authenticate(String session_token)
Authenticates a session token and loads player information. (Async) Returns true if authentication was successful. The authentication_completed signal is emitted on completion.
bool is_authenticated()
Returns true if the player has authenticated and user data is available.
bool has_trophy(String trophy_id, bool include_pending=true)
Returns true if the player has the trophy specified.
EzchaTrophyObtained get_trophy(String trophy_id)
Returns the trophy if the player has obtained it, null otherwise.
bool grant_trophy(String trophy_id)
Grants a trophy to the currently authenticated user. (Async) Returns true if the trophy grant was queued.
bool has_score(String leaderboard_id)
Checks if the player has a score on a leaderboard.
float get_score(String leaderboard_id, float defaults_to=0.0)
Returns the players's score on a specific leaderboard.
bool update_score(String leaderboard_id, float score, EzchaLeaderboardsAPI.UpdateMode mode=0)
Updates a leaderboard entry belonging to the player. (Async) Returns true if the score update was queued.
String get_datastore(String key)
Get a datastore value belonging to the currently authenticated player. The datastore_value_received signal is emitted when the value is received. (Async) Returns a string value. The value will be empty if deleted or not yet set.
bool set_datastore(String key, String value)
Update a datastore value belonging to the currently authenticated player. Limit of 5 keys per user, limit of 16384 characters per value. Set the value to an empty string to delete the key. The datastore_value_posted signal is emitted on completion. (Async) Returns true if the value was successfully updated.
Inherits: RefCounted
A class that manages a file upload stream over HTTPS.
| Returns | Name |
|---|---|
| EzchaUploader | set_hostname(String value) |
| EzchaUploader | set_port(int value) |
| EzchaUploader | set_endpoint(String value) |
| EzchaUploader | set_authentication(String token) |
| EzchaUploader | add_file(String field, String type, String path) |
| EzchaUploader | set_timeout(float time) |
| EzchaUploader | add_progress_callback(Callable cb) |
| EzchaUploader | set_response_object(EzchaResponse obj) |
| EzchaUploader | add_query_parameter(String key, Variant value) |
| EzchaResponse | start() |
progress()
Emitted as the upload progresses.
EzchaUploader set_hostname(String value)
Sets the target hostname.
EzchaUploader set_port(int value)
Sets the target port.
EzchaUploader set_endpoint(String value)
Sets the target endpoint.
EzchaUploader set_authentication(String token)
Sets the authentication header.
EzchaUploader add_file(String field, String type, String path)
Adds a file to the upload.
EzchaUploader set_timeout(float time)
Sets the upload timeout.
EzchaUploader add_progress_callback(Callable cb)
Adds a callback function to be called when the upload progresses.
EzchaUploader set_response_object(EzchaResponse obj)
Set the response object.
EzchaUploader add_query_parameter(String key, Variant value)
Adds a parameter to the query string.
EzchaResponse start()
Starts the upload and returns the response object to await.
Inherits: Texture2D
A helper texture resource that loads an image from the internet.
| Type | Name | Default |
|---|---|---|
| String | url | "" |
| Texture2D | placeholder | null |
| String | assume_type | "" |
| bool | generate_mipmaps | true |
| Returns | Name |
|---|---|
| bool | is_successful() |
loaded()
Emitted when the image is downloaded and ready to be displayed.
error()
Emitted if the image could not be loaded.
String url = ""
The URL to download the image from.
Texture2D placeholder = null
The placeholder image to display before/while the URL is downloaded.
String assume_type = ""
If the image type cannot be determined it will set it to this value.
bool generate_mipmaps = true
Generate mipmaps for the downloaded image.
bool is_successful()
Returns true if the image has been downloaded and parsed.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | slug | "" |
| String | name | "" |
| String | description | "" |
| String | version | "" |
| bool | elite_exclusive | false |
| String | pricing_model | "" |
| int | price | 0 |
| EzchaUser | developer | null |
| String | url | "" |
| String | banner_url | "" |
| String | thumbnail_url | "" |
| String | released_timestamp | "" |
| String | original_released_timestamp | "" |
| Returns | Name |
|---|---|
| bool | equals(EzchaGame other) |
| EzchaTrophyListResponse | get_trophies(String session_token="") |
| EzchaLeaderboardListResponse | get_leaderboards(String session_token="") |
| EzchaProductListResponse | get_products(String session_token="") |
String id = ""
The game's unique identifier.
String slug = ""
The user-friendly identifier for the game in URLs.
String name = ""
The display name of the game.
String description = ""
The description for the game.
String version = ""
The version the game is specified to be at. This does not follow any specific format.
bool elite_exclusive = false
If true the game can only be accessed by users who have elite membership.
String pricing_model = ""
The pricing model for the game. free, elite_exclusive, select_price_suggested, select_price_minimum, fixed_price
int price = 0
The price of the game in USD cents.
EzchaUser developer = null
The developer for the game.
String url = ""
The URL the game can be viewed and played at.
String banner_url = ""
The URL for the game's banner image. This will be a png file.
String thumbnail_url = ""
The URL for the game's thumbnail image. This will be a png file.
String released_timestamp = ""
The timestamp for when the game was released on Ezcha.
String original_released_timestamp = ""
The timestamp for when the game was published on other platforms before Ezcha. Not all games will have this.
Check if two instances represent the same game. Data can vary if requested at different times.
EzchaTrophyListResponse get_trophies(String session_token="")
Requests the trophies belonging to this game. A session with sufficient permissions can be provided to include unlisted trophies, but is not required.
EzchaLeaderboardListResponse get_leaderboards(String session_token="")
Requests the leaderboards belonging to this game. A session with sufficient permissions can be provided to include unlisted leaderboards, but is not required.
EzchaProductListResponse get_products(String session_token="")
Requests the products belonging to this game. A session with sufficient permissions can be provided to include unlisted products, but is not required.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | name | "" |
| bool | unlisted | false |
| String | sorting | "" |
| String | value_type | "" |
| String | value_prefix | "" |
| String | value_suffix | "" |
| String | created_timestamp | "" |
| Returns | Name |
|---|---|
| bool | equals(EzchaLeaderboard other) |
| EzchaLeaderboardEntryListResponse | get_entries(int page=1, int items_per_page=-1, String session_token="") |
String id = ""
The leaderboard's unique identifier.
String name = ""
The display name of the leaderboard.
bool unlisted = false
Indicates if the leaderboard is hidden from public view.
String sorting = ""
The sort mode of the leaderboard. ("asc" or "desc")
String value_type = ""
The value type the leaderboard represents. (Score, Points, Wins, etc)
String value_prefix = ""
The prefix to show before the values when displayed.
String value_suffix = ""
The suffix to show after the values when displayed.
String created_timestamp = ""
The timestamp of when the leaderboard was created.
bool equals(EzchaLeaderboard other)
Check if two instances represent the same leaderboard. Data can vary if requested at different times.
EzchaLeaderboardEntryListResponse get_entries(int page=1, int items_per_page=-1, String session_token="")
Returns a paginated list of entries for this leaderboard. A session token is only required when attempting to access an unlisted leaderboard.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| float | score | 0.0 |
| int | ranking | -1 |
| EzchaLeaderboard | leaderboard | null |
| EzchaUser | user | null |
| String | created_timestamp | "" |
| String | last_updated_timestamp | "" |
float score = 0.0
The entry's current score.
int ranking = -1
The player's current ranking if available.
EzchaLeaderboard leaderboard = null
The leaderboard that the entry belongs to. Not all responses will included this data.
EzchaUser user = null
The user that the entry belongs to. Not all responses will included this data.
String created_timestamp = ""
The timestamp of when this entry was first created.
String last_updated_timestamp = ""
The timestamp of when this entry was last updated.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | slug | "" |
| String | title | "" |
| String | summary | "" |
| bool | elite_exclusive | false |
| EzchaUser | author | null |
| String | published_timestamp | "" |
| String | edited_timestamp | "" |
| String | url | "" |
| String | image_url | "" |
| Returns | Name |
|---|---|
| bool | equals(EzchaNewsPost other) |
String id = ""
The news post's unique identifier.
String slug = ""
The user-friendly identifier for the news post in URLs.
String title = ""
The title of the news post.
String summary = ""
A short summary of the news post.
bool elite_exclusive = false
If true the news post can only be accessed by users who have elite membership.
EzchaUser author = null
The author of the news post.
String published_timestamp = ""
The timestamp of when the news post was published.
String edited_timestamp = ""
The timestamp of when the news post was last edited. Not all news posts will have this.
String url = ""
The URL that the news post can be viewed at.
String image_url = ""
The URL of the news post's featured image. Not all news posts will have this.
bool equals(EzchaNewsPost other)
Check if two instances represent the same news post. Data can vary if requested at different times.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | name | "" |
| String | description | "" |
| bool | unlisted | false |
| bool | consumable | false |
| int | price | -1 |
| String | created_timestamp | "" |
| String | icon_url | "" |
| Returns | Name |
|---|---|
| bool | equals(EzchaProduct other) |
String id = ""
The product's unique identifier.
String name = ""
The display name of the product.
String description = ""
The description of the product. This typically includes its criteria.
bool unlisted = false
Indicates if the product is hidden from public view.
bool consumable = false
Indicates if the product is consumable or permanent.
int price = -1
The price of the product in USD cents.
String created_timestamp = ""
The timestamp of when the product was created.
String icon_url = ""
The URL for the product's icon image. This will be a png file.
bool equals(EzchaProduct other)
Check if two instances represent the same product. Data can vary if requested at different times.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| EzchaProduct | product | null |
| String | completed_timestamp | "" |
| bool | consumed | false |
String id = ""
The unique identifier of the purchase.
EzchaProduct product = null
The product associated with the purchase.
String completed_timestamp = ""
The time when the purchase was completed.
bool consumed = false
Indicates if the purchase was consumed.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | join_code | "" |
| String | name | "" |
| String | version | "" |
| int | game_mode | -1 |
| Variant | player_count | -1 |
| Variant | player_limit | -1 |
| String | created_at | "" |
| EzchaUser | host | null |
| EzchaRelayServer | server | null |
| Returns | Name |
|---|---|
| bool | equals(EzchaRelayLobby other) |
String id = ""
The UUID of the lobby.
String join_code = ""
The 6 character join code of the lobby.
String name = ""
The name of the lobby.
String version = ""
The game version the lobby supports.
int game_mode = -1
The game mode the lobby currently is in.
Variant player_count = -1
The current player count.
Variant player_limit = -1
The lobby's player limit.
String created_at = ""
A timestamp of when the lobby was created.
EzchaUser host = null
The current host of the lobby.
EzchaRelayServer server = null
The server which the lobby is hosted on.
bool equals(EzchaRelayLobby other)
Check if two instances represent the same lobby. Data can vary if requested at different times.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | name | "" |
| String | region | "" |
| String | address | "" |
| bool | elite_exclusive | false |
| int | lobby_count | -1 |
| Variant | player_count | -1 |
| Returns | Name |
|---|---|
| int | ping() |
| bool | equals(EzchaRelayServer other) |
String id = ""
The server's unique identifier.
String name = ""
The user friendly name of the region.
String region = ""
The region the server is in.
String address = ""
The address of the relay server.
bool elite_exclusive = false
Whether or not the server is elite exclusive.
int lobby_count = -1
The cached lobby count.
Variant player_count = -1
The cached player count.
int ping()
Attempt to ping the server. (Async) Returns the time spent in milliseconds or -1 if failed.
bool equals(EzchaRelayServer other)
Check if two instances represent the same server. Data can vary if requested at different times.
Inherits: EzchaDto
Inherited By: EzchaTrophyObtained
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | name | "" |
| String | description | "" |
| bool | unlisted | false |
| int | experience_points | 0 |
| String | created_timestamp | "" |
| String | icon_url | "" |
| Returns | Name |
|---|---|
| bool | equals(EzchaTrophy other) |
String id = ""
The trophy's unique identifier.
String name = ""
The display name of the trophy.
String description = ""
The description of the trophy. This typically includes its criteria.
bool unlisted = false
Indicates if the trophy is hidden from public view.
int experience_points = 0
The number of experience points the trophy rewards once received.
String created_timestamp = ""
The timestamp of when the trophy was created.
String icon_url = ""
The URL for the trophy's icon image. This will be a png file.
bool equals(EzchaTrophy other)
Check if two instances represent the same trophy. Data can vary if requested at different times.
Inherits: EzchaTrophy
| Type | Name | Default |
|---|---|---|
| String | obtained_timestamp | "" |
String obtained_timestamp = ""
The timestamp for when the user obtained the trophy.
Inherits: EzchaDto
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| String | name | "" |
| String | bio | "" |
| String | role | "" |
| String | title | "" |
| int | level | -1 |
| bool | elite | false |
| bool | guest | false |
| String | registered_timestamp | "" |
| String | last_seen_timestamp | "" |
| String | url | "" |
| String | avatar_url | "" |
| Returns | Name |
|---|---|
| bool | equals(EzchaUser other) |
| EzchaTrophyObtainedListResponse | get_trophies(String game_id) |
| EzchaFriendsResponse | check_friends(String user_id) |
String id = ""
The user's unique identifier.
String name = ""
The user's unique username.
String bio = ""
A description provided by the user. This is displayed in the "about me" section on Ezcha profiles.
String role = ""
The user's role if they currently have one.
String title = ""
The user's title if they currently have one.
int level = -1
The total level the user is currently at.
bool elite = false
If true the user currently has elite membership.
bool guest = false
If true the user represents an Ezcha Relay guest.
String registered_timestamp = ""
The timestamp of when the user registered their account.
String last_seen_timestamp = ""
The timestamp of when the user was last seen online.
String url = ""
The URL to view the user's profile.
String avatar_url = ""
The URL for the user's avatar/profile picture. This will be a png file.
Check if two instances represent the same user. Data can vary if requested at different times.
EzchaTrophyObtainedListResponse get_trophies(String game_id)
Lists the trophies this user has obtained for the specified game.
EzchaFriendsResponse check_friends(String user_id)
Check if this user is friends with another specific user.
Inherits: EzchaResponse
A response from the API that returns if a captcha response was valid or not.
| Type | Name | Default |
|---|---|---|
| bool | valid | false |
bool valid = false
Returns true if the captcha response was valid.
Inherits: EzchaResponse
A response from the API containing a datastore value.
| Type | Name | Default |
|---|---|---|
| String | value | "" |
String value = ""
The value of the requested key. Returns an empty string if deleted or not set.
Inherits: EzchaResponse
A response from the API that returns whether or not two users are friends.
| Type | Name | Default |
|---|---|---|
| bool | friends | false |
bool friends = false
Returns true if the two users are friends.
Inherits: EzchaResponse
A response from the API containing a list of games.
| Type | Name | Default |
|---|---|---|
| Array[EzchaGame] | games | [] |
The list of games returned by the API request.
Inherits: EzchaResponse
A response from the API containing a single game.
| Type | Name | Default |
|---|---|---|
| EzchaGame | game | null |
EzchaGame game = null
The game returned by the API request.
Inherits: EzchaResponse
A response from the API containing the status of the API.
| Type | Name | Default |
|---|---|---|
| bool | online | false |
bool online = false
Indicates if the Ezcha Network API is online and accessible.
Inherits: EzchaResponse
A response from the API containing the current time.
| Type | Name | Default |
|---|---|---|
| String | timestamp | "" |
| int | epoch | -1 |
String timestamp = ""
The server's current time as an ISO 8601 datestring.
int epoch = -1
The server's current time as a unix epoch measured in milliseconds.
Inherits: EzchaPaginatedResponse
A response from the API containing a paginated list of leaderboard entries.
| Type | Name | Default |
|---|---|---|
| Array[EzchaLeaderboardEntry] | entries | [] |
Array[EzchaLeaderboardEntry] entries = []
The list of leaderboard entries returned by the API request.
Inherits: EzchaResponse
A response from the API containing a list of leaderboards.
| Type | Name | Default |
|---|---|---|
| Array[EzchaLeaderboard] | leaderboards | [] |
Array[EzchaLeaderboard] leaderboards = []
The list of leaderboards returned by the API request.
Inherits: EzchaResponse
A response from the API that returns if a leaderboard update has been queued.
| Type | Name | Default |
|---|---|---|
| bool | queued | false |
bool queued = false
Returns true if an update has been queued.
Inherits: EzchaPaginatedResponse
A response from the relay API containing a list of lobbies.
| Type | Name | Default |
|---|---|---|
| Array[EzchaRelayLobby] | lobbies | [] |
Array[EzchaRelayLobby] lobbies = []
The list of lobbies returned by the API request.
Inherits: EzchaPaginatedResponse
A response from the API containing a paginated list of news posts.
| Type | Name | Default |
|---|---|---|
| Array[EzchaNewsPost] | posts | [] |
Array[EzchaNewsPost] posts = []
The list of news posts returned by the API request.
Inherits: EzchaResponse
Inherited By: EzchaLeaderboardEntryListResponse, EzchaLobbyListResponse, EzchaNewsListResponse, EzchaUserListResponse
A paginated response from the API.
| Type | Name | Default |
|---|---|---|
| int | page | -1 |
| int | page_count | -1 |
| int | items_per_page | -1 |
| int | total_results | -1 |
int page = -1
The current page.
int page_count = -1
The total number of pages available.
int items_per_page = -1
The limit of how many items can be displayed on each page.
int total_results = -1
The total number of results returned.
Inherits: EzchaResponse
A response from the API containing a list of products.
| Type | Name | Default |
|---|---|---|
| Array[EzchaProduct] | products | [] |
Array[EzchaProduct] products = []
The list of products returned by the API request.
Inherits: EzchaResponse
A response from the API revealing if a purchase is legitimate.
| Type | Name | Default |
|---|---|---|
| String | id | "" |
| EzchaProduct | product | null |
| String | completed_timestamp | "" |
| bool | consumed | false |
String id = ""
The ID of the purchase.
EzchaProduct product = null
The product associated with the purchase.
String completed_timestamp = ""
The time when the purchase was completed.
bool consumed = false
Indicates if the purchase was consumed.
Inherits: EzchaResponse
A response from the API containing a single relay lobby.
| Type | Name | Default |
|---|---|---|
| EzchaRelayLobby | lobby | null |
EzchaRelayLobby lobby = null
The lobby returned by the API request.
Inherits: EzchaResponse
A response from the API containing a list of available relay servers.
| Type | Name | Default |
|---|---|---|
| Array[EzchaRelayServer] | servers | [] |
| Array[String] | countries | [] |
Array[EzchaRelayServer] servers = []
The list of relay servers returned by the API request.
The country codes of available relay servers.
Inherits: EzchaResponse
A response from the API containing the information related to a validated session.
| Type | Name | Default |
|---|---|---|
| EzchaUser | user | null |
| Array[EzchaTrophyObtained] | trophies_obtained | [] |
| Array[EzchaLeaderboardEntry] | leaderboard_entries | [] |
| Array[EzchaProductPurchase] | products_purchased | [] |
| Array[EzchaProductPurchase] | products_unconsumed | [] |
| int | tipped_amount | 0 |
| bool | moderation_tools | false |
EzchaUser user = null
The user associated with the session.
Array[EzchaTrophyObtained] trophies_obtained = []
The trophies that the user has obtained from this game.
Array[EzchaLeaderboardEntry] leaderboard_entries = []
The leaderboard entries the user has for this game.
Array[EzchaProductPurchase] products_purchased = []
The permanent/non-consumable product purchases the user has made.
Array[EzchaProductPurchase] products_unconsumed = []
The product purchases the user has made which are pending consumption.
int tipped_amount = 0
The total amount the user has tipped for this game. This is measured in USD cents.
bool moderation_tools = false
If true the user should have access to any available moderation tools.
Inherits: EzchaResponse
A response from the API containing a list of trophies.
| Type | Name | Default |
|---|---|---|
| Array[EzchaTrophy] | trophies | [] |
Array[EzchaTrophy] trophies = []
The list of trophies returned by the API request.
Inherits: EzchaResponse
A response from the API containing a list of trophies.
| Type | Name | Default |
|---|---|---|
| Array[EzchaTrophyObtained] | trophies | [] |
Array[EzchaTrophyObtained] trophies = []
The list of trophies returned by the API request.
Inherits: EzchaResponse
A response from the API that returns from a trophy grant.
| Type | Name | Default |
|---|---|---|
| bool | queued | false |
| EzchaTrophyObtained | trophy | null |
bool queued = false
Returns true if the grant was successful.
EzchaTrophyObtained trophy = null
The data of the granted trophy.
Inherits: EzchaPaginatedResponse
A response from the API containing a paginated list of users.
| Type | Name | Default |
|---|---|---|
| Array[EzchaUser] | users | [] |
The list of users returned by the API request.
Inherits: EzchaResponse
A response from the API containing a single user.
| Type | Name | Default |
|---|---|---|
| EzchaUser | user | null |
EzchaUser user = null
The user returned by the API request.
Inherits: EzchaResponse
A response from the API containing multiple users.
| Type | Name | Default |
|---|---|---|
| Array[EzchaUser] | users | [] |
The users returned by the API request.