Google_VotesServiceResource
The "votes" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /google-api/src/contrib/Google_ModeratorService.php
- class Google_VotesServiceResource extends Google_ServiceResource {
- /**
- * Inserts a new vote by the authenticated user for the specified submission within the specified
- * series. (votes.insert)
- *
- * @param string $seriesId The decimal ID of the Series.
- * @param string $submissionId The decimal ID of the Submission within the Series.
- * @param Google_Vote $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string unauthToken User identifier for unauthenticated usage mode
- * @return Google_Vote
- */
- public function insert($seriesId, $submissionId, Google_Vote $postBody, $optParams = array()) {
- $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Vote($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates the votes by the authenticated user for the specified submission within the specified
- * series. This method supports patch semantics. (votes.patch)
- *
- * @param string $seriesId The decimal ID of the Series.
- * @param string $submissionId The decimal ID of the Submission within the Series.
- * @param Google_Vote $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string userId
- * @opt_param string unauthToken User identifier for unauthenticated usage mode
- * @return Google_Vote
- */
- public function patch($seriesId, $submissionId, Google_Vote $postBody, $optParams = array()) {
- $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_Vote($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists the votes by the authenticated user for the given series. (votes.list)
- *
- * @param string $seriesId The decimal ID of the Series.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string max-results Maximum number of results to return.
- * @opt_param string start-index Index of the first result to be retrieved.
- * @return Google_VoteList
- */
- public function listVotes($seriesId, $optParams = array()) {
- $params = array('seriesId' => $seriesId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_VoteList($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates the votes by the authenticated user for the specified submission within the specified
- * series. (votes.update)
- *
- * @param string $seriesId The decimal ID of the Series.
- * @param string $submissionId The decimal ID of the Submission within the Series.
- * @param Google_Vote $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string userId
- * @opt_param string unauthToken User identifier for unauthenticated usage mode
- * @return Google_Vote
- */
- public function update($seriesId, $submissionId, Google_Vote $postBody, $optParams = array()) {
- $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Vote($data);
- } else {
- return $data;
- }
- }
- /**
- * Returns the votes by the authenticated user for the specified submission within the specified
- * series. (votes.get)
- *
- * @param string $seriesId The decimal ID of the Series.
- * @param string $submissionId The decimal ID of the Submission within the Series.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string userId
- * @opt_param string unauthToken User identifier for unauthenticated usage mode
- * @return Google_Vote
- */
- public function get($seriesId, $submissionId, $optParams = array()) {
- $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Vote($data);
- } else {
- return $data;
- }
- }
- }