Skip to content
YYBartT edited this page Jan 18, 2026 · 1 revision

Match

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

elements_match_get_matches

Elements Operation: getMatches

This function lists all matches available. Under most circumstances, this will require that a profile be made available to the request. The server may choose to return an error if no suitable profile can be determined.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback Function.


Syntax:

elements_match_get_matches(_offset=undefined, _count=undefined, _search=undefined, _callback=undefined)
Argument Type Description
_offset Real The offset of the first result to return in the page.
_count Real The number of results to return in the page.
_search String The search filter to use.
_callback Function The function - with signature (status, data, request) - that will be executed upon request completion.



Returns:

N/A


Triggers:

Callback Function

Key Type Description
_status Real
_data ElementsPaginationMatch
_request ElementsRequest



Back To Top

elements_match_create_match

Elements Operation: createMatch

This function accepts an instance of Match, effectively requesting that the server find a suitable opponent for a game. As other suitable players create matches the created match object may be updated as a suitable opponent is found. The client must poll matches for updates and react accordingly.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback Function.


Syntax:

elements_match_create_match(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsMatch The body to be included in the HTTP request.
_callback Function The function - with signature (status, data, request) - that will be executed upon request completion.



Returns:

N/A


Triggers:

Callback Function

Key Type Description
_status Real
_data ElementsMatch
_request ElementsRequest



Back To Top

elements_match_get_match

Elements Operation: getMatch

This function gets a specific match given the match's unique ID. Additionally, it is possible to instruct the API to wait for a period of time before sending the response. The request will intentionally hang until the requested Match with ID has been updated in the database.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback Function.


Syntax:

elements_match_get_match(_match_id, _social_engine_long_poll_timeout=undefined, _callback=undefined)
Argument Type Description
_match_id String The ID of the match.
_social_engine_long_poll_timeout Real The maximum amount time the server will wait until a request returns a default set of data for long polling. Specifying a zero will request that the server wait indefinitely until responding. Though, the server may enforce a practical upper limit on the amount of time it takes to return. Omitting this header will prompt the server to treat the request as a normal request.
_callback Function The function - with signature (status, data, request) - that will be executed upon request completion.



Returns:

N/A


Triggers:

Callback Function

Key Type Description
_status Real
_data ElementsMatch
_request ElementsRequest



Back To Top

elements_match_delete_match

Elements Operation: deleteMatch

This function deletes and permanently removes the Match from the server. This effectively will cancel any pending request for a match. If a game is currently being played against the match, the server may reject the request to delete the match until the game concludes.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback Function.


Syntax:

elements_match_delete_match(_match_id, _callback=undefined)
Argument Type Description
_match_id String The ID of the match.
_callback Function The function - with signature (status, data, request) - that will be executed upon request completion.



Returns:

N/A


Triggers:

Callback Function

Key Type Description
_status Real
_data Undefined
_request ElementsRequest


Clone this wiki locally