Google_Service_AppState_States_Resource

The "states" collection of methods.

Defined (1)

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

/lib/Google/Service/AppState.php  
  1. class Google_Service_AppState_States_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Clears (sets to empty) the data for the passed key if and only if the passed 
  5. * version matches the currently stored version. This method results in a 
  6. * conflict error on version mismatch. (states.clear) 
  7. * @param int $stateKey 
  8. * The key for the data to be retrieved. 
  9. * @param array $optParams Optional parameters. 
  10. * @opt_param string currentDataVersion 
  11. * The version of the data to be cleared. Version strings are returned by the server. 
  12. * @return Google_Service_AppState_WriteResult 
  13. */ 
  14. public function clear($stateKey, $optParams = array()) 
  15. $params = array('stateKey' => $stateKey); 
  16. $params = array_merge($params, $optParams); 
  17. return $this->call('clear', array($params), "Google_Service_AppState_WriteResult"); 
  18. /** 
  19. * Deletes a key and the data associated with it. The key is removed and no 
  20. * longer counts against the key quota. Note that since this method is not safe 
  21. * in the face of concurrent modifications, it should only be used for 
  22. * development and testing purposes. Invoking this method in shipping code can 
  23. * result in data loss and data corruption. (states.delete) 
  24. * @param int $stateKey 
  25. * The key for the data to be retrieved. 
  26. * @param array $optParams Optional parameters. 
  27. */ 
  28. public function delete($stateKey, $optParams = array()) 
  29. $params = array('stateKey' => $stateKey); 
  30. $params = array_merge($params, $optParams); 
  31. return $this->call('delete', array($params)); 
  32. /** 
  33. * Retrieves the data corresponding to the passed key. If the key does not exist 
  34. * on the server, an HTTP 404 will be returned. (states.get) 
  35. * @param int $stateKey 
  36. * The key for the data to be retrieved. 
  37. * @param array $optParams Optional parameters. 
  38. * @return Google_Service_AppState_GetResponse 
  39. */ 
  40. public function get($stateKey, $optParams = array()) 
  41. $params = array('stateKey' => $stateKey); 
  42. $params = array_merge($params, $optParams); 
  43. return $this->call('get', array($params), "Google_Service_AppState_GetResponse"); 
  44. /** 
  45. * Lists all the states keys, and optionally the state data. (states.listStates) 
  46. * @param array $optParams Optional parameters. 
  47. * @opt_param bool includeData 
  48. * Whether to include the full data in addition to the version number 
  49. * @return Google_Service_AppState_ListResponse 
  50. */ 
  51. public function listStates($optParams = array()) 
  52. $params = array(); 
  53. $params = array_merge($params, $optParams); 
  54. return $this->call('list', array($params), "Google_Service_AppState_ListResponse"); 
  55. /** 
  56. * Update the data associated with the input key if and only if the passed 
  57. * version matches the currently stored version. This method is safe in the face 
  58. * of concurrent writes. Maximum per-key size is 128KB. (states.update) 
  59. * @param int $stateKey 
  60. * The key for the data to be retrieved. 
  61. * @param Google_UpdateRequest $postBody 
  62. * @param array $optParams Optional parameters. 
  63. * @opt_param string currentStateVersion 
  64. * The version of the app state your application is attempting to update. If this does not match 
  65. * the current version, this method will return a conflict error. If there is no data stored on the 
  66. * server for this key, the update will succeed irrespective of the value of this parameter. 
  67. * @return Google_Service_AppState_WriteResult 
  68. */ 
  69. public function update($stateKey, Google_Service_AppState_UpdateRequest $postBody, $optParams = array()) 
  70. $params = array('stateKey' => $stateKey, 'postBody' => $postBody); 
  71. $params = array_merge($params, $optParams); 
  72. return $this->call('update', array($params), "Google_Service_AppState_WriteResult");