Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Google_Service_Games_TurnBasedMatches_Resource Class Reference

The "turnBasedMatches" collection of methods. More...

Inheritance diagram for Google_Service_Games_TurnBasedMatches_Resource:
Google_Service_Resource

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)
 

Detailed Description

The "turnBasedMatches" collection of methods.

Typical usage is: $gamesService = new Google_Service_Games(...); $turnBasedMatches = $gamesService->turnBasedMatches;

Member Function Documentation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ cancel()

Google_Service_Games_TurnBasedMatches_Resource::cancel ( $matchId,
$optParams = array() )

Cancel a turn-based match.

(turnBasedMatches.cancel)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional parameters.

◆ create()

Google_Service_Games_TurnBasedMatches_Resource::create ( Google_Service_Games_TurnBasedMatchCreateRequest $postBody,
$optParams = array() )

Create a turn-based match.

(turnBasedMatches.create)

Parameters
Google_TurnBasedMatchCreateRequest$postBody
array$optParamsOptional parameters.

@opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_TurnBasedMatch

◆ decline()

Google_Service_Games_TurnBasedMatches_Resource::decline ( $matchId,
$optParams = array() )

Decline an invitation to play a turn-based match.

(turnBasedMatches.decline)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional parameters.

@opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_TurnBasedMatch

◆ dismiss()

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)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional parameters.

◆ finish()

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)

Parameters
string$matchIdThe ID of the match.
Google_TurnBasedMatchResults$postBody
array$optParamsOptional parameters.

@opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_TurnBasedMatch

◆ get()

Google_Service_Games_TurnBasedMatches_Resource::get ( $matchId,
$optParams = array() )

Get the data for a turn-based match.

(turnBasedMatches.get)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional 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.

Return values
Google_Service_Games_TurnBasedMatch

◆ join()

Google_Service_Games_TurnBasedMatches_Resource::join ( $matchId,
$optParams = array() )

Join a turn-based match.

(turnBasedMatches.join)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional parameters.

@opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_TurnBasedMatch

◆ leave()

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)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional parameters.

@opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_TurnBasedMatch

◆ leaveTurn()

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)

Parameters
string$matchIdThe ID of the match.
int$matchVersionThe version of the match being updated.
array$optParamsOptional 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.

Return values
Google_Service_Games_TurnBasedMatch

◆ listTurnBasedMatches()

Google_Service_Games_TurnBasedMatches_Resource::listTurnBasedMatches ( $optParams = array())

Returns turn-based matches the player is or was involved in.

(turnBasedMatches.listTurnBasedMatches)

Parameters
array$optParamsOptional 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.

Return values
Google_Service_Games_TurnBasedMatchList

◆ rematch()

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)

Parameters
string$matchIdThe ID of the match.
array$optParamsOptional 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.

Return values
Google_Service_Games_TurnBasedMatchRematch

◆ sync()

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)

Parameters
array$optParamsOptional 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.

Return values
Google_Service_Games_TurnBasedMatchSync

◆ takeTurn()

Google_Service_Games_TurnBasedMatches_Resource::takeTurn ( $matchId,
Google_Service_Games_TurnBasedMatchTurn $postBody,
$optParams = array() )

Commit the results of a player turn.

(turnBasedMatches.takeTurn)

Parameters
string$matchIdThe ID of the match.
Google_TurnBasedMatchTurn$postBody
array$optParamsOptional parameters.

@opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_TurnBasedMatch

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