/lib/google/contrib/Google_OrkutService.php
PHP | 2554 lines | 1990 code | 90 blank | 474 comment | 56 complexity | d0cd466c78cd9c8dcd1e0cfef384696b MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-3.0, GPL-3.0, LGPL-2.1, Apache-2.0, BSD-3-Clause, AGPL-3.0
Large files files are truncated, but you can click here to view the full file
- <?php
- /*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
- /**
- * The "communityMembers" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityMembers = $orkutService->communityMembers;
- * </code>
- */
- class Google_CommunityMembersServiceResource extends Google_ServiceResource {
- /**
- * Makes the user join a community. (communityMembers.insert)
- *
- * @param int $communityId ID of the community.
- * @param string $userId ID of the user.
- * @param array $optParams Optional parameters.
- * @return Google_CommunityMembers
- */
- public function insert($communityId, $userId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityMembers($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the relationship between a user and a community. (communityMembers.get)
- *
- * @param int $communityId ID of the community.
- * @param string $userId ID of the user.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityMembers
- */
- public function get($communityId, $userId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityMembers($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists members of a community. Use the pagination tokens to retrieve the full list; do not rely on
- * the member count available in the community profile information to know when to stop iterating,
- * as that count may be approximate. (communityMembers.list)
- *
- * @param int $communityId The ID of the community whose members will be listed.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param bool friendsOnly Whether to list only community members who are friends of the user.
- * @opt_param string maxResults The maximum number of members to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityMembersList
- */
- public function listCommunityMembers($communityId, $optParams = array()) {
- $params = array('communityId' => $communityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityMembersList($data);
- } else {
- return $data;
- }
- }
- /**
- * Makes the user leave a community. (communityMembers.delete)
- *
- * @param int $communityId ID of the community.
- * @param string $userId ID of the user.
- * @param array $optParams Optional parameters.
- */
- public function delete($communityId, $userId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "activities" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $activities = $orkutService->activities;
- * </code>
- */
- class Google_ActivitiesServiceResource extends Google_ServiceResource {
- /**
- * Retrieves a list of activities. (activities.list)
- *
- * @param string $userId The ID of the user whose activities will be listed. Can be me to refer to the viewer (i.e. the authenticated user).
- * @param string $collection The collection of activities to list.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param string maxResults The maximum number of activities to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_ActivityList
- */
- public function listActivities($userId, $collection, $optParams = array()) {
- $params = array('userId' => $userId, 'collection' => $collection);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_ActivityList($data);
- } else {
- return $data;
- }
- }
- /**
- * Deletes an existing activity, if the access controls allow it. (activities.delete)
- *
- * @param string $activityId ID of the activity to remove.
- * @param array $optParams Optional parameters.
- */
- public function delete($activityId, $optParams = array()) {
- $params = array('activityId' => $activityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "communityPollComments" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityPollComments = $orkutService->communityPollComments;
- * </code>
- */
- class Google_CommunityPollCommentsServiceResource extends Google_ServiceResource {
- /**
- * Adds a comment on a community poll. (communityPollComments.insert)
- *
- * @param int $communityId The ID of the community whose poll is being commented.
- * @param string $pollId The ID of the poll being commented.
- * @param Google_CommunityPollComment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_CommunityPollComment
- */
- public function insert($communityId, $pollId, Google_CommunityPollComment $postBody, $optParams = array()) {
- $params = array('communityId' => $communityId, 'pollId' => $pollId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityPollComment($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the comments of a community poll. (communityPollComments.list)
- *
- * @param int $communityId The ID of the community whose poll is having its comments listed.
- * @param string $pollId The ID of the community whose polls will be listed.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param string maxResults The maximum number of comments to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityPollCommentList
- */
- public function listCommunityPollComments($communityId, $pollId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'pollId' => $pollId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityPollCommentList($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "communityPolls" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityPolls = $orkutService->communityPolls;
- * </code>
- */
- class Google_CommunityPollsServiceResource extends Google_ServiceResource {
- /**
- * Retrieves the polls of a community. (communityPolls.list)
- *
- * @param int $communityId The ID of the community which polls will be listed.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param string maxResults The maximum number of polls to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityPollList
- */
- public function listCommunityPolls($communityId, $optParams = array()) {
- $params = array('communityId' => $communityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityPollList($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves one specific poll of a community. (communityPolls.get)
- *
- * @param int $communityId The ID of the community for whose poll will be retrieved.
- * @param string $pollId The ID of the poll to get.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityPoll
- */
- public function get($communityId, $pollId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'pollId' => $pollId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityPoll($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "communityMessages" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityMessages = $orkutService->communityMessages;
- * </code>
- */
- class Google_CommunityMessagesServiceResource extends Google_ServiceResource {
- /**
- * Adds a message to a given community topic. (communityMessages.insert)
- *
- * @param int $communityId The ID of the community the message should be added to.
- * @param string $topicId The ID of the topic the message should be added to.
- * @param Google_CommunityMessage $postBody
- * @param array $optParams Optional parameters.
- * @return Google_CommunityMessage
- */
- public function insert($communityId, $topicId, Google_CommunityMessage $postBody, $optParams = array()) {
- $params = array('communityId' => $communityId, 'topicId' => $topicId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityMessage($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the messages of a topic of a community. (communityMessages.list)
- *
- * @param int $communityId The ID of the community which messages will be listed.
- * @param string $topicId The ID of the topic which messages will be listed.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param string maxResults The maximum number of messages to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityMessageList
- */
- public function listCommunityMessages($communityId, $topicId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'topicId' => $topicId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityMessageList($data);
- } else {
- return $data;
- }
- }
- /**
- * Moves a message of the community to the trash folder. (communityMessages.delete)
- *
- * @param int $communityId The ID of the community whose message will be moved to the trash folder.
- * @param string $topicId The ID of the topic whose message will be moved to the trash folder.
- * @param string $messageId The ID of the message to be moved to the trash folder.
- * @param array $optParams Optional parameters.
- */
- public function delete($communityId, $topicId, $messageId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'topicId' => $topicId, 'messageId' => $messageId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "communityTopics" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityTopics = $orkutService->communityTopics;
- * </code>
- */
- class Google_CommunityTopicsServiceResource extends Google_ServiceResource {
- /**
- * Adds a topic to a given community. (communityTopics.insert)
- *
- * @param int $communityId The ID of the community the topic should be added to.
- * @param Google_CommunityTopic $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param bool isShout Whether this topic is a shout.
- * @return Google_CommunityTopic
- */
- public function insert($communityId, Google_CommunityTopic $postBody, $optParams = array()) {
- $params = array('communityId' => $communityId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityTopic($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves a topic of a community. (communityTopics.get)
- *
- * @param int $communityId The ID of the community whose topic will be retrieved.
- * @param string $topicId The ID of the topic to get.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityTopic
- */
- public function get($communityId, $topicId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'topicId' => $topicId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityTopic($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the topics of a community. (communityTopics.list)
- *
- * @param int $communityId The ID of the community which topics will be listed.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param string maxResults The maximum number of topics to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityTopicList
- */
- public function listCommunityTopics($communityId, $optParams = array()) {
- $params = array('communityId' => $communityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityTopicList($data);
- } else {
- return $data;
- }
- }
- /**
- * Moves a topic of the community to the trash folder. (communityTopics.delete)
- *
- * @param int $communityId The ID of the community whose topic will be moved to the trash folder.
- * @param string $topicId The ID of the topic to be moved to the trash folder.
- * @param array $optParams Optional parameters.
- */
- public function delete($communityId, $topicId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'topicId' => $topicId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "comments" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $comments = $orkutService->comments;
- * </code>
- */
- class Google_CommentsServiceResource extends Google_ServiceResource {
- /**
- * Inserts a new comment to an activity. (comments.insert)
- *
- * @param string $activityId The ID of the activity to contain the new comment.
- * @param Google_Comment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Comment
- */
- public function insert($activityId, Google_Comment $postBody, $optParams = array()) {
- $params = array('activityId' => $activityId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Comment($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves an existing comment. (comments.get)
- *
- * @param string $commentId ID of the comment to get.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_Comment
- */
- public function get($commentId, $optParams = array()) {
- $params = array('commentId' => $commentId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Comment($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves a list of comments, possibly filtered. (comments.list)
- *
- * @param string $activityId The ID of the activity containing the comments.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string orderBy Sort search results.
- * @opt_param string pageToken A continuation token that allows pagination.
- * @opt_param string maxResults The maximum number of activities to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommentList
- */
- public function listComments($activityId, $optParams = array()) {
- $params = array('activityId' => $activityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommentList($data);
- } else {
- return $data;
- }
- }
- /**
- * Deletes an existing comment. (comments.delete)
- *
- * @param string $commentId ID of the comment to remove.
- * @param array $optParams Optional parameters.
- */
- public function delete($commentId, $optParams = array()) {
- $params = array('commentId' => $commentId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "acl" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $acl = $orkutService->acl;
- * </code>
- */
- class Google_AclServiceResource extends Google_ServiceResource {
- /**
- * Excludes an element from the ACL of the activity. (acl.delete)
- *
- * @param string $activityId ID of the activity.
- * @param string $userId ID of the user to be removed from the activity.
- * @param array $optParams Optional parameters.
- */
- public function delete($activityId, $userId, $optParams = array()) {
- $params = array('activityId' => $activityId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "communityRelated" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityRelated = $orkutService->communityRelated;
- * </code>
- */
- class Google_CommunityRelatedServiceResource extends Google_ServiceResource {
- /**
- * Retrieves the communities related to another one. (communityRelated.list)
- *
- * @param int $communityId The ID of the community whose related communities will be listed.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityList
- */
- public function listCommunityRelated($communityId, $optParams = array()) {
- $params = array('communityId' => $communityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityList($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "scraps" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $scraps = $orkutService->scraps;
- * </code>
- */
- class Google_ScrapsServiceResource extends Google_ServiceResource {
- /**
- * Creates a new scrap. (scraps.insert)
- *
- * @param Google_Activity $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Activity
- */
- public function insert(Google_Activity $postBody, $optParams = array()) {
- $params = array('postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Activity($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "communityPollVotes" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityPollVotes = $orkutService->communityPollVotes;
- * </code>
- */
- class Google_CommunityPollVotesServiceResource extends Google_ServiceResource {
- /**
- * Votes on a community poll. (communityPollVotes.insert)
- *
- * @param int $communityId The ID of the community whose poll is being voted.
- * @param string $pollId The ID of the poll being voted.
- * @param Google_CommunityPollVote $postBody
- * @param array $optParams Optional parameters.
- * @return Google_CommunityPollVote
- */
- public function insert($communityId, $pollId, Google_CommunityPollVote $postBody, $optParams = array()) {
- $params = array('communityId' => $communityId, 'pollId' => $pollId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityPollVote($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "communities" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communities = $orkutService->communities;
- * </code>
- */
- class Google_CommunitiesServiceResource extends Google_ServiceResource {
- /**
- * Retrieves the list of communities the current user is a member of. (communities.list)
- *
- * @param string $userId The ID of the user whose communities will be listed. Can be me to refer to caller.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string orderBy How to order the communities by.
- * @opt_param string maxResults The maximum number of communities to include in the response.
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_CommunityList
- */
- public function listCommunities($userId, $optParams = array()) {
- $params = array('userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityList($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the basic information (aka. profile) of a community. (communities.get)
- *
- * @param int $communityId The ID of the community to get.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string hl Specifies the interface language (host language) of your user interface.
- * @return Google_Community
- */
- public function get($communityId, $optParams = array()) {
- $params = array('communityId' => $communityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Community($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "communityFollow" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $communityFollow = $orkutService->communityFollow;
- * </code>
- */
- class Google_CommunityFollowServiceResource extends Google_ServiceResource {
- /**
- * Adds a user as a follower of a community. (communityFollow.insert)
- *
- * @param int $communityId ID of the community.
- * @param string $userId ID of the user.
- * @param array $optParams Optional parameters.
- * @return Google_CommunityMembers
- */
- public function insert($communityId, $userId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_CommunityMembers($data);
- } else {
- return $data;
- }
- }
- /**
- * Removes a user from the followers of a community. (communityFollow.delete)
- *
- * @param int $communityId ID of the community.
- * @param string $userId ID of the user.
- * @param array $optParams Optional parameters.
- */
- public function delete($communityId, $userId, $optParams = array()) {
- $params = array('communityId' => $communityId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }
- /**
- * The "activityVisibility" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $activityVisibility = $orkutService->activityVisibility;
- * </code>
- */
- class Google_ActivityVisibilityServiceResource extends Google_ServiceResource {
- /**
- * Updates the visibility of an existing activity. This method supports patch semantics.
- * (activityVisibility.patch)
- *
- * @param string $activityId ID of the activity.
- * @param Google_Visibility $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Visibility
- */
- public function patch($activityId, Google_Visibility $postBody, $optParams = array()) {
- $params = array('activityId' => $activityId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_Visibility($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates the visibility of an existing activity. (activityVisibility.update)
- *
- * @param string $activityId ID of the activity.
- * @param Google_Visibility $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Visibility
- */
- public function update($activityId, Google_Visibility $postBody, $optParams = array()) {
- $params = array('activityId' => $activityId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Visibility($data);
- } else {
- return $data;
- }
- }
- /**
- * Gets the visibility of an existing activity. (activityVisibility.get)
- *
- * @param string $activityId ID of the activity to get the visibility.
- * @param array $optParams Optional parameters.
- * @return Google_Visibility
- */
- public function get($activityId, $optParams = array()) {
- $params = array('activityId' => $activityId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Visibility($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "badges" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $badges = $orkutService->badges;
- * </code>
- */
- class Google_BadgesServiceResource extends Google_ServiceResource {
- /**
- * Retrieves the list of visible badges of a user. (badges.list)
- *
- * @param string $userId The id of the user whose badges will be listed. Can be me to refer to caller.
- * @param array $optParams Optional parameters.
- * @return Google_BadgeList
- */
- public function listBadges($userId, $optParams = array()) {
- $params = array('userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_BadgeList($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves a badge from a user. (badges.get)
- *
- * @param string $userId The ID of the user whose badges will be listed. Can be me to refer to caller.
- * @param string $badgeId The ID of the badge that will be retrieved.
- * @param array $optParams Optional parameters.
- * @return Google_Badge
- */
- public function get($userId, $badgeId, $optParams = array()) {
- $params = array('userId' => $userId, 'badgeId' => $badgeId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Badge($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "counters" collection of methods.
- * Typical usage is:
- * <code>
- * $orkutService = new Google_OrkutService(...);
- * $counters = $orkutService->counters;
- * </code>
- */
- class Google_CountersServiceResource extends Google_ServiceResource {
- /**
- * Retrieves the counters of a user. (counters.list)
- *
- * @param string $userId The ID of the user whose counters will be listed. Can be me to refer to caller.
- * @param array $optParams Optional parameters.
- * @return Google_Counters
- */
- public function listCounters($userId, $optParams = array()) {
- $params = array('userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Counters($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * Service definition for Google_Orkut (v2).
- *
- * <p>
- * Lets you manage activities, comments and badges in Orkut. More stuff coming in time.
- * </p>
- *
- * <p>
- * For more information about this service, see the
- * <a href="http://code.google.com/apis/orkut/v2/reference.html" target="_blank">API Documentation</a>
- * </p>
- *
- * @author Google, Inc.
- */
- class Google_OrkutService extends Google_Service {
- public $communityMembers;
- public $activities;
- public $communityPollComments;
- public $communityPolls;
- public $communityMessages;
- public $communityTopics;
- public $comments;
- public $acl;
- public $communityRelated;
- public $scraps;
- public $communityPollVotes;
- public $communities;
- public $communityFollow;
- public $activityVisibility;
- public $badges;
- public $counters;
- /**
- * Constructs the internal representation of the Orkut service.
- *
- * @param Google_Client $client
- */
- public function __construct(Google_Client $client) {
- $this->servicePath = 'orkut/v2/';
- $this->version = 'v2';
- $this->serviceName = 'orkut';
- $client->addService($this->serviceName, $this->version);
- $this->communityMembers = new Google_CommunityMembersServiceResource($this, $this->serviceName, 'communityMembers', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "userId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.communityMembers.insert", "httpMethod": "POST", "path": "communities/{communityId}/members/{userId}", "response": {"$ref": "CommunityMembers"}}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "userId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityMembers.get", "httpMethod": "GET", "path": "communities/{communityId}/members/{userId}", "response": {"$ref": "CommunityMembers"}}, "list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "friendsOnly": {"type": "boolean", "location": "query"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "maxResults": {"minimum": "1", "type": "integer", "location": "query", "format": "uint32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityMembers.list", "httpMethod": "GET", "path": "communities/{communityId}/members", "response": {"$ref": "CommunityMembersList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "communities/{communityId}/members/{userId}", "id": "orkut.communityMembers.delete", "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "userId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
- $this->activities = new Google_ActivitiesServiceResource($this, $this->serviceName, 'activities', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"location": "query", "minimum": "1", "type": "integer", "maximum": "100", "format": "uint32"}, "userId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}, "collection": {"required": true, "type": "string", "location": "path", "enum": ["all", "scraps", "stream"]}}, "id": "orkut.activities.list", "httpMethod": "GET", "path": "people/{userId}/activities/{collection}", "response": {"$ref": "ActivityList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "activities/{activityId}", "id": "orkut.activities.delete", "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
- $this->communityPollComments = new Google_CommunityPollCommentsServiceResource($this, $this->serviceName, 'communityPollComments', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "pollId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "CommunityPollComment"}, "response": {"$ref": "CommunityPollComment"}, "httpMethod": "POST", "path": "communities/{communityId}/polls/{pollId}/comments", "id": "orkut.communityPollComments.insert"}, "list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"pollId": {"required": true, "type": "string", "location": "path"}, "pageToken": {"type": "string", "location": "query"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "maxResults": {"minimum": "1", "type": "integer", "location": "query", "format": "uint32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityPollComments.list", "httpMethod": "GET", "path": "communities/{communityId}/polls/{pollId}/comments", "response": {"$ref": "CommunityPollCommentList"}}}}', true));
- $this->communityPolls = new Google_CommunityPollsServiceResource($this, $this->serviceName, 'communityPolls', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "maxResults": {"minimum": "1", "type": "integer", "location": "query", "format": "uint32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityPolls.list", "httpMethod": "GET", "path": "communities/{communityId}/polls", "response": {"$ref": "CommunityPollList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "pollId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityPolls.get", "httpMethod": "GET", "path": "communities/{communityId}/polls/{pollId}", "response": {"$ref": "CommunityPoll"}}}}', true));
- $this->communityMessages = new Google_CommunityMessagesServiceResource($this, $this->serviceName, 'communityMessages', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"topicId": {"required": true, "type": "string", "location": "path", "format": "int64"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}}, "request": {"$ref": "CommunityMessage"}, "response": {"$ref": "CommunityMessage"}, "httpMethod": "POST", "path": "communities/{communityId}/topics/{topicId}/messages", "id": "orkut.communityMessages.insert"}, "list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "maxResults": {"location": "query", "minimum": "1", "type": "integer", "maximum": "100", "format": "uint32"}, "hl": {"type": "string", "location": "query"}, "topicId": {"required": true, "type": "string", "location": "path", "format": "int64"}}, "id": "orkut.communityMessages.list", "httpMethod": "GET", "path": "communities/{communityId}/topics/{topicId}/messages", "response": {"$ref": "CommunityMessageList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "communities/{communityId}/topics/{topicId}/messages/{messageId}", "id": "orkut.communityMessages.delete", "parameters": {"topicId": {"required": true, "type": "string", "location": "path", "format": "int64"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "messageId": {"required": true, "type": "string", "location": "path", "format": "int64"}}, "httpMethod": "DELETE"}}}', true));
- $this->communityTopics = new Google_CommunityTopicsServiceResource($this, $this->serviceName, 'communityTopics', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"isShout": {"type": "boolean", "location": "query"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}}, "request": {"$ref": "CommunityTopic"}, "response": {"$ref": "CommunityTopic"}, "httpMethod": "POST", "path": "communities/{communityId}/topics", "id": "orkut.communityTopics.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"topicId": {"required": true, "type": "string", "location": "path", "format": "int64"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityTopics.get", "httpMethod": "GET", "path": "communities/{communityId}/topics/{topicId}", "response": {"$ref": "CommunityTopic"}}, "list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "maxResults": {"location": "query", "minimum": "1", "type": "integer", "maximum": "100", "format": "uint32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityTopics.list", "httpMethod": "GET", "path": "communities/{communityId}/topics", "response": {"$ref": "CommunityTopicList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "communities/{communityId}/topics/{topicId}", "id": "orkut.communityTopics.delete", "parameters": {"topicId": {"required": true, "type": "string", "location": "path", "format": "int64"}, "communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}}, "httpMethod": "DELETE"}}}', true));
- $this->comments = new Google_CommentsServiceResource($this, $this->serviceName, 'comments', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "httpMethod": "POST", "path": "activities/{activityId}/comments", "id": "orkut.comments.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"commentId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.comments.get", "httpMethod": "GET", "path": "comments/{commentId}", "response": {"$ref": "Comment"}}, "list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"orderBy": {"default": "DESCENDING_SORT", "enum": ["ascending", "descending"], "type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "activityId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"minimum": "1", "type": "integer", "location": "query", "format": "uint32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.comments.list", "httpMethod": "GET", "path": "activities/{activityId}/comments", "response": {"$ref": "CommentList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "comments/{commentId}", "id": "orkut.comments.delete", "parameters": {"commentId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
- $this->acl = new Google_AclServiceResource($this, $this->serviceName, 'acl', json_decode('{"methods": {"delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "activities/{activityId}/acl/{userId}", "id": "orkut.acl.delete", "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}, "userId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
- $this->communityRelated = new Google_CommunityRelatedServiceResource($this, $this->serviceName, 'communityRelated', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communityRelated.list", "httpMethod": "GET", "path": "communities/{communityId}/related", "response": {"$ref": "CommunityList"}}}}', true));
- $this->scraps = new Google_ScrapsServiceResource($this, $this->serviceName, 'scraps', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "request": {"$ref": "Activity"}, "response": {"$ref": "Activity"}, "httpMethod": "POST", "path": "activities/scraps", "id": "orkut.scraps.insert"}}}', true));
- $this->communityPollVotes = new Google_CommunityPollVotesServiceResource($this, $this->serviceName, 'communityPollVotes', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "pollId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "CommunityPollVote"}, "response": {"$ref": "CommunityPollVote"}, "httpMethod": "POST", "path": "communities/{communityId}/polls/{pollId}/votes", "id": "orkut.communityPollVotes.insert"}}}', true));
- $this->communities = new Google_CommunitiesServiceResource($this, $this->serviceName, 'communities', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"orderBy": {"enum": ["id", "ranked"], "type": "string", "location": "query"}, "userId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"minimum": "1", "type": "integer", "location": "query", "format": "uint32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communities.list", "httpMethod": "GET", "path": "people/{userId}/communities", "response": {"$ref": "CommunityList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.communities.get", "httpMethod": "GET", "path": "communities/{communityId}", "response": {"$ref": "Community"}}}}', true));
- $this->communityFollow = new Google_CommunityFollowServiceResource($this, $this->serviceName, 'communityFollow', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "userId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.communityFollow.insert", "httpMethod": "POST", "path": "communities/{communityId}/followers/{userId}", "response": {"$ref": "CommunityMembers"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "path": "communities/{communityId}/followers/{userId}", "id": "orkut.communityFollow.delete", "parameters": {"communityId": {"required": true, "type": "integer", "location": "path", "format": "int32"}, "userId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
- $this->activityVisibility = new Google_ActivityVisibilityServiceResource($this, $this->serviceName, 'activityVisibility', json_decode('{"methods": {"patch": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Visibility"}, "response": {"$ref": "Visibility"}, "httpMethod": "PATCH", "path": "activities/{activityId}/visibility", "id": "orkut.activityVisibility.patch"}, "update": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Visibility"}, "response": {"$ref": "Visibility"}, "httpMethod": "PUT", "path": "activities/{activityId}/visibility", "id": "orkut.activityVisibility.update"}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.activityVisibility.get", "httpMethod": "GET", "path": "activities/{activityId}/visibility", "response": {"$ref": "Visibility"}}}}', true));
- $this->badges = new Google_BadgesServiceResource($this, $this->serviceName, 'badges', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.badges.list", "httpMethod": "GET", "path": "people/{userId}/badges", "response": {"$ref": "BadgeList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}, "badgeId": {"required": true, "type": "string", "location": "path", "format": "int64"}}, "id": "orkut.badges.get", "httpMethod": "GET", "path": "people/{userId}/badges/{badgeId}", "response": {"$ref": "Badge"…
Large files files are truncated, but you can click here to view the full file