Google_VotesServiceResource

The "votes" collection of methods.

Defined (1)

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

/inc/google-api-php-client/src/contrib/Google_ModeratorService.php  
  1. class Google_VotesServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Inserts a new vote by the authenticated user for the specified submission within the specified 
  6. * series. (votes.insert) 
  7. * @param string $seriesId The decimal ID of the Series. 
  8. * @param string $submissionId The decimal ID of the Submission within the Series. 
  9. * @param Google_Vote $postBody 
  10. * @param array $optParams Optional parameters. 
  11. * @opt_param string unauthToken User identifier for unauthenticated usage mode 
  12. * @return Google_Vote 
  13. */ 
  14. public function insert($seriesId, $submissionId, Google_Vote $postBody, $optParams = array()) { 
  15. $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'postBody' => $postBody); 
  16. $params = array_merge($params, $optParams); 
  17. $data = $this->__call('insert', array($params)); 
  18. if ($this->useObjects()) { 
  19. return new Google_Vote($data); 
  20. } else { 
  21. return $data; 
  22. /** 
  23. * Updates the votes by the authenticated user for the specified submission within the specified 
  24. * series. This method supports patch semantics. (votes.patch) 
  25. * @param string $seriesId The decimal ID of the Series. 
  26. * @param string $submissionId The decimal ID of the Submission within the Series. 
  27. * @param Google_Vote $postBody 
  28. * @param array $optParams Optional parameters. 
  29. * @opt_param string userId 
  30. * @opt_param string unauthToken User identifier for unauthenticated usage mode 
  31. * @return Google_Vote 
  32. */ 
  33. public function patch($seriesId, $submissionId, Google_Vote $postBody, $optParams = array()) { 
  34. $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'postBody' => $postBody); 
  35. $params = array_merge($params, $optParams); 
  36. $data = $this->__call('patch', array($params)); 
  37. if ($this->useObjects()) { 
  38. return new Google_Vote($data); 
  39. } else { 
  40. return $data; 
  41. /** 
  42. * Lists the votes by the authenticated user for the given series. (votes.list) 
  43. * @param string $seriesId The decimal ID of the Series. 
  44. * @param array $optParams Optional parameters. 
  45. * @opt_param string max-results Maximum number of results to return. 
  46. * @opt_param string start-index Index of the first result to be retrieved. 
  47. * @return Google_VoteList 
  48. */ 
  49. public function listVotes($seriesId, $optParams = array()) { 
  50. $params = array('seriesId' => $seriesId); 
  51. $params = array_merge($params, $optParams); 
  52. $data = $this->__call('list', array($params)); 
  53. if ($this->useObjects()) { 
  54. return new Google_VoteList($data); 
  55. } else { 
  56. return $data; 
  57. /** 
  58. * Updates the votes by the authenticated user for the specified submission within the specified 
  59. * series. (votes.update) 
  60. * @param string $seriesId The decimal ID of the Series. 
  61. * @param string $submissionId The decimal ID of the Submission within the Series. 
  62. * @param Google_Vote $postBody 
  63. * @param array $optParams Optional parameters. 
  64. * @opt_param string userId 
  65. * @opt_param string unauthToken User identifier for unauthenticated usage mode 
  66. * @return Google_Vote 
  67. */ 
  68. public function update($seriesId, $submissionId, Google_Vote $postBody, $optParams = array()) { 
  69. $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'postBody' => $postBody); 
  70. $params = array_merge($params, $optParams); 
  71. $data = $this->__call('update', array($params)); 
  72. if ($this->useObjects()) { 
  73. return new Google_Vote($data); 
  74. } else { 
  75. return $data; 
  76. /** 
  77. * Returns the votes by the authenticated user for the specified submission within the specified 
  78. * series. (votes.get) 
  79. * @param string $seriesId The decimal ID of the Series. 
  80. * @param string $submissionId The decimal ID of the Submission within the Series. 
  81. * @param array $optParams Optional parameters. 
  82. * @opt_param string userId 
  83. * @opt_param string unauthToken User identifier for unauthenticated usage mode 
  84. * @return Google_Vote 
  85. */ 
  86. public function get($seriesId, $submissionId, $optParams = array()) { 
  87. $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId); 
  88. $params = array_merge($params, $optParams); 
  89. $data = $this->__call('get', array($params)); 
  90. if ($this->useObjects()) { 
  91. return new Google_Vote($data); 
  92. } else { 
  93. return $data;