Google_Service_Games_Achievements_Resource

The "achievements" collection of methods.

Defined (1)

The class is defined in the following location(s).

/includes/api-libs/Google/Service/Games.php  
  1. class Google_Service_Games_Achievements_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Increments the steps of the achievement with the given ID for the currently 
  5. * authenticated player. (achievements.increment) 
  6. * @param string $achievementId The ID of the achievement used by this method. 
  7. * @param int $stepsToIncrement The number of steps to increment. 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string requestId A randomly generated numeric ID for each request 
  10. * specified by the caller. This number is used at the server to ensure that the 
  11. * request is handled correctly across retries. 
  12. * @return Google_Service_Games_AchievementIncrementResponse 
  13. */ 
  14. public function increment($achievementId, $stepsToIncrement, $optParams = array()) 
  15. $params = array('achievementId' => $achievementId, 'stepsToIncrement' => $stepsToIncrement); 
  16. $params = array_merge($params, $optParams); 
  17. return $this->call('increment', array($params), "Google_Service_Games_AchievementIncrementResponse"); 
  18.  
  19. /** 
  20. * Lists the progress for all your application's achievements for the currently 
  21. * authenticated player. (achievements.listAchievements) 
  22. * @param string $playerId A player ID. A value of me may be used in place of 
  23. * the authenticated player's ID. 
  24. * @param array $optParams Optional parameters. 
  25. * @opt_param string pageToken The token returned by the previous request. 
  26. * @opt_param string state Tells the server to return only achievements with the 
  27. * specified state. If this parameter isn't specified, all achievements are 
  28. * returned. 
  29. * @opt_param int maxResults The maximum number of achievement resources to 
  30. * return in the response, used for paging. For any response, the actual number 
  31. * of achievement resources returned may be less than the specified maxResults. 
  32. * @opt_param string language The preferred language to use for strings returned 
  33. * by this method. 
  34. * @return Google_Service_Games_PlayerAchievementListResponse 
  35. */ 
  36. public function listAchievements($playerId, $optParams = array()) 
  37. $params = array('playerId' => $playerId); 
  38. $params = array_merge($params, $optParams); 
  39. return $this->call('list', array($params), "Google_Service_Games_PlayerAchievementListResponse"); 
  40.  
  41. /** 
  42. * Sets the state of the achievement with the given ID to REVEALED for the 
  43. * currently authenticated player. (achievements.reveal) 
  44. * @param string $achievementId The ID of the achievement used by this method. 
  45. * @param array $optParams Optional parameters. 
  46. * @return Google_Service_Games_AchievementRevealResponse 
  47. */ 
  48. public function reveal($achievementId, $optParams = array()) 
  49. $params = array('achievementId' => $achievementId); 
  50. $params = array_merge($params, $optParams); 
  51. return $this->call('reveal', array($params), "Google_Service_Games_AchievementRevealResponse"); 
  52.  
  53. /** 
  54. * Sets the steps for the currently authenticated player towards unlocking an 
  55. * achievement. If the steps parameter is less than the current number of steps 
  56. * that the player already gained for the achievement, the achievement is not 
  57. * modified. (achievements.setStepsAtLeast) 
  58. * @param string $achievementId The ID of the achievement used by this method. 
  59. * @param int $steps The minimum value to set the steps to. 
  60. * @param array $optParams Optional parameters. 
  61. * @return Google_Service_Games_AchievementSetStepsAtLeastResponse 
  62. */ 
  63. public function setStepsAtLeast($achievementId, $steps, $optParams = array()) 
  64. $params = array('achievementId' => $achievementId, 'steps' => $steps); 
  65. $params = array_merge($params, $optParams); 
  66. return $this->call('setStepsAtLeast', array($params), "Google_Service_Games_AchievementSetStepsAtLeastResponse"); 
  67.  
  68. /** 
  69. * Unlocks this achievement for the currently authenticated player. 
  70. * (achievements.unlock) 
  71. * @param string $achievementId The ID of the achievement used by this method. 
  72. * @param array $optParams Optional parameters. 
  73. * @return Google_Service_Games_AchievementUnlockResponse 
  74. */ 
  75. public function unlock($achievementId, $optParams = array()) 
  76. $params = array('achievementId' => $achievementId); 
  77. $params = array_merge($params, $optParams); 
  78. return $this->call('unlock', array($params), "Google_Service_Games_AchievementUnlockResponse"); 
  79.  
  80. /** 
  81. * Updates multiple achievements for the currently authenticated player. 
  82. * (achievements.updateMultiple) 
  83. * @param Google_AchievementUpdateMultipleRequest $postBody 
  84. * @param array $optParams Optional parameters. 
  85. * @return Google_Service_Games_AchievementUpdateMultipleResponse 
  86. */ 
  87. public function updateMultiple(Google_Service_Games_AchievementUpdateMultipleRequest $postBody, $optParams = array()) 
  88. $params = array('postBody' => $postBody); 
  89. $params = array_merge($params, $optParams); 
  90. return $this->call('updateMultiple', array($params), "Google_Service_Games_AchievementUpdateMultipleResponse");