Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
The "turnBasedMatches" collection of methods. More...
Public Member Functions | |
call ($name, $arguments, $expected_class=null) | |
TODO: This function needs simplifying. | |
cancel ($matchId, $optParams=array()) | |
Cancel a turn-based match. | |
create (Google_Service_Games_TurnBasedMatchCreateRequest $postBody, $optParams=array()) | |
Create a turn-based match. | |
decline ($matchId, $optParams=array()) | |
Decline an invitation to play a turn-based match. | |
dismiss ($matchId, $optParams=array()) | |
Dismiss a turn-based match from the match list. | |
finish ($matchId, Google_Service_Games_TurnBasedMatchResults $postBody, $optParams=array()) | |
Finish a turn-based match. | |
get ($matchId, $optParams=array()) | |
Get the data for a turn-based match. | |
join ($matchId, $optParams=array()) | |
Join a turn-based match. | |
leave ($matchId, $optParams=array()) | |
Leave a turn-based match when it is not the current player's turn, without canceling the match. | |
leaveTurn ($matchId, $matchVersion, $optParams=array()) | |
Leave a turn-based match during the current player's turn, without canceling the match. | |
listTurnBasedMatches ($optParams=array()) | |
Returns turn-based matches the player is or was involved in. | |
rematch ($matchId, $optParams=array()) | |
Create a rematch of a match that was previously completed, with the same participants. | |
sync ($optParams=array()) | |
Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first. | |
takeTurn ($matchId, Google_Service_Games_TurnBasedMatchTurn $postBody, $optParams=array()) | |
Commit the results of a player turn. | |
Protected Member Functions | |
convertToArrayAndStripNulls ($o) | |
The "turnBasedMatches" collection of methods.
Typical usage is: $gamesService = new Google_Service_Games(...); $turnBasedMatches = $gamesService->turnBasedMatches;
|
inherited |
TODO: This function needs simplifying.
$name | |
$arguments | |
$expected_class | - optional, the expected class name |
Google_Http_Request|expected_class |
Google_Exception |
Google_Service_Games_TurnBasedMatches_Resource::cancel | ( | $matchId, | |
$optParams = array() ) |
Cancel a turn-based match.
(turnBasedMatches.cancel)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
Google_Service_Games_TurnBasedMatches_Resource::create | ( | Google_Service_Games_TurnBasedMatchCreateRequest | $postBody, |
$optParams = array() ) |
Create a turn-based match.
(turnBasedMatches.create)
Google_TurnBasedMatchCreateRequest | $postBody | |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::decline | ( | $matchId, | |
$optParams = array() ) |
Decline an invitation to play a turn-based match.
(turnBasedMatches.decline)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::dismiss | ( | $matchId, | |
$optParams = array() ) |
Dismiss a turn-based match from the match list.
The match will no longer show up in the list and will not generate notifications. (turnBasedMatches.dismiss)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
Google_Service_Games_TurnBasedMatches_Resource::finish | ( | $matchId, | |
Google_Service_Games_TurnBasedMatchResults | $postBody, | ||
$optParams = array() ) |
Finish a turn-based match.
Each player should make this call once, after all results are in. Only the player whose turn it is may make the first call to Finish, and can pass in the final match state. (turnBasedMatches.finish)
string | $matchId | The ID of the match. |
Google_TurnBasedMatchResults | $postBody | |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::get | ( | $matchId, | |
$optParams = array() ) |
Get the data for a turn-based match.
(turnBasedMatches.get)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method. @opt_param bool includeMatchData Get match data along with metadata.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::join | ( | $matchId, | |
$optParams = array() ) |
Join a turn-based match.
(turnBasedMatches.join)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::leave | ( | $matchId, | |
$optParams = array() ) |
Leave a turn-based match when it is not the current player's turn, without canceling the match.
(turnBasedMatches.leave)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::leaveTurn | ( | $matchId, | |
$matchVersion, | |||
$optParams = array() ) |
Leave a turn-based match during the current player's turn, without canceling the match.
(turnBasedMatches.leaveTurn)
string | $matchId | The ID of the match. |
int | $matchVersion | The version of the match being updated. |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method. @opt_param string pendingParticipantId The ID of another participant who should take their turn next. If not set, the match will wait for other player(s) to join via automatching; this is only valid if automatch criteria is set on the match with remaining slots for automatched players.
Google_Service_Games_TurnBasedMatch |
Google_Service_Games_TurnBasedMatches_Resource::listTurnBasedMatches | ( | $optParams = array() | ) |
Returns turn-based matches the player is or was involved in.
(turnBasedMatches.listTurnBasedMatches)
array | $optParams | Optional parameters. |
@opt_param string pageToken The token returned by the previous request. @opt_param int maxCompletedMatches The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled. @opt_param int maxResults The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults. @opt_param string language The preferred language to use for strings returned by this method. @opt_param bool includeMatchData True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.
Google_Service_Games_TurnBasedMatchList |
Google_Service_Games_TurnBasedMatches_Resource::rematch | ( | $matchId, | |
$optParams = array() ) |
Create a rematch of a match that was previously completed, with the same participants.
This can be called by only one player on a match still in their list; the player must have called Finish first. Returns the newly created match; it will be the caller's turn. (turnBasedMatches.rematch)
string | $matchId | The ID of the match. |
array | $optParams | Optional parameters. |
@opt_param string requestId A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries. @opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatchRematch |
Google_Service_Games_TurnBasedMatches_Resource::sync | ( | $optParams = array() | ) |
Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first.
Matches that should be removed from the local cache will have a status of MATCH_DELETED. (turnBasedMatches.sync)
array | $optParams | Optional parameters. |
@opt_param string pageToken The token returned by the previous request. @opt_param int maxCompletedMatches The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled. @opt_param int maxResults The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults. @opt_param string language The preferred language to use for strings returned by this method. @opt_param bool includeMatchData True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.
Google_Service_Games_TurnBasedMatchSync |
Google_Service_Games_TurnBasedMatches_Resource::takeTurn | ( | $matchId, | |
Google_Service_Games_TurnBasedMatchTurn | $postBody, | ||
$optParams = array() ) |
Commit the results of a player turn.
(turnBasedMatches.takeTurn)
string | $matchId | The ID of the match. |
Google_TurnBasedMatchTurn | $postBody | |
array | $optParams | Optional parameters. |
@opt_param string language The preferred language to use for strings returned by this method.
Google_Service_Games_TurnBasedMatch |