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

The "achievements" collection of methods. More...

Inheritance diagram for Google_Service_Games_Achievements_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 increment ($achievementId, $stepsToIncrement, $optParams=array())
 Increments the steps of the achievement with the given ID for the currently authenticated player.
 
 listAchievements ($playerId, $optParams=array())
 Lists the progress for all your application's achievements for the currently authenticated player.
 
 reveal ($achievementId, $optParams=array())
 Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.
 
 setStepsAtLeast ($achievementId, $steps, $optParams=array())
 Sets the steps for the currently authenticated player towards unlocking an achievement.
 
 unlock ($achievementId, $optParams=array())
 Unlocks this achievement for the currently authenticated player.
 
 updateMultiple (Google_Service_Games_AchievementUpdateMultipleRequest $postBody, $optParams=array())
 Updates multiple achievements for the currently authenticated player.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "achievements" collection of methods.

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

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

◆ increment()

Google_Service_Games_Achievements_Resource::increment ( $achievementId,
$stepsToIncrement,
$optParams = array() )

Increments the steps of the achievement with the given ID for the currently authenticated player.

(achievements.increment)

Parameters
string$achievementIdThe ID of the achievement used by this method.
int$stepsToIncrementThe number of steps to increment.
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.

Return values
Google_Service_Games_AchievementIncrementResponse

◆ listAchievements()

Google_Service_Games_Achievements_Resource::listAchievements ( $playerId,
$optParams = array() )

Lists the progress for all your application's achievements for the currently authenticated player.

(achievements.listAchievements)

Parameters
string$playerIdA player ID. A value of me may be used in place of the authenticated player's ID.
array$optParamsOptional parameters.

@opt_param string pageToken The token returned by the previous request. @opt_param string state Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned. @opt_param int maxResults The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults. @opt_param string language The preferred language to use for strings returned by this method.

Return values
Google_Service_Games_PlayerAchievementListResponse

◆ reveal()

Google_Service_Games_Achievements_Resource::reveal ( $achievementId,
$optParams = array() )

Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.

(achievements.reveal)

Parameters
string$achievementIdThe ID of the achievement used by this method.
array$optParamsOptional parameters.
Return values
Google_Service_Games_AchievementRevealResponse

◆ setStepsAtLeast()

Google_Service_Games_Achievements_Resource::setStepsAtLeast ( $achievementId,
$steps,
$optParams = array() )

Sets the steps for the currently authenticated player towards unlocking an achievement.

If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified. (achievements.setStepsAtLeast)

Parameters
string$achievementIdThe ID of the achievement used by this method.
int$stepsThe minimum value to set the steps to.
array$optParamsOptional parameters.
Return values
Google_Service_Games_AchievementSetStepsAtLeastResponse

◆ unlock()

Google_Service_Games_Achievements_Resource::unlock ( $achievementId,
$optParams = array() )

Unlocks this achievement for the currently authenticated player.

(achievements.unlock)

Parameters
string$achievementIdThe ID of the achievement used by this method.
array$optParamsOptional parameters.
Return values
Google_Service_Games_AchievementUnlockResponse

◆ updateMultiple()

Google_Service_Games_Achievements_Resource::updateMultiple ( Google_Service_Games_AchievementUpdateMultipleRequest $postBody,
$optParams = array() )

Updates multiple achievements for the currently authenticated player.

(achievements.updateMultiple)

Parameters
Google_AchievementUpdateMultipleRequest$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Games_AchievementUpdateMultipleResponse

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