Google_MembersServiceResource

The "members" collection of methods.

Defined (1)

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

/src/contrib/Google_DirectoryService.php  
  1. class Google_MembersServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Remove membership. (members.delete) 
  6. * @param string $groupKey Email or immutable Id of the group 
  7. * @param string $memberKey Email or immutable Id of the member 
  8. * @param array $optParams Optional parameters. 
  9. */ 
  10. public function delete($groupKey, $memberKey, $optParams = array()) { 
  11. $params = array('groupKey' => $groupKey, 'memberKey' => $memberKey); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('delete', array($params)); 
  14. return $data; 
  15. /** 
  16. * Retrieve Group Member (members.get) 
  17. * @param string $groupKey Email or immutable Id of the group 
  18. * @param string $memberKey Email or immutable Id of the member 
  19. * @param array $optParams Optional parameters. 
  20. * @return Google_Member 
  21. */ 
  22. public function get($groupKey, $memberKey, $optParams = array()) { 
  23. $params = array('groupKey' => $groupKey, 'memberKey' => $memberKey); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('get', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_Member($data); 
  28. } else { 
  29. return $data; 
  30. /** 
  31. * Add user to the specified group. (members.insert) 
  32. * @param string $groupKey Email or immutable Id of the group 
  33. * @param Google_Member $postBody 
  34. * @param array $optParams Optional parameters. 
  35. * @return Google_Member 
  36. */ 
  37. public function insert($groupKey, Google_Member $postBody, $optParams = array()) { 
  38. $params = array('groupKey' => $groupKey, 'postBody' => $postBody); 
  39. $params = array_merge($params, $optParams); 
  40. $data = $this->__call('insert', array($params)); 
  41. if ($this->useObjects()) { 
  42. return new Google_Member($data); 
  43. } else { 
  44. return $data; 
  45. /** 
  46. * Retrieve all members in a group (paginated) (members.list) 
  47. * @param string $groupKey Email or immutable Id of the group 
  48. * @param array $optParams Optional parameters. 
  49. * @opt_param int maxResults Maximum number of results to return. Default is 200 
  50. * @opt_param string pageToken Token to specify next page in the list 
  51. * @opt_param string roles Comma separated role values to filter list results on. 
  52. * @return Google_Members 
  53. */ 
  54. public function listMembers($groupKey, $optParams = array()) { 
  55. $params = array('groupKey' => $groupKey); 
  56. $params = array_merge($params, $optParams); 
  57. $data = $this->__call('list', array($params)); 
  58. if ($this->useObjects()) { 
  59. return new Google_Members($data); 
  60. } else { 
  61. return $data; 
  62. /** 
  63. * Update membership of a user in the specified group. This method supports patch semantics. 
  64. * (members.patch) 
  65. * @param string $groupKey Email or immutable Id of the group. If Id, it should match with id of group object 
  66. * @param string $memberKey Email or immutable Id of the user. If Id, it should match with id of member object 
  67. * @param Google_Member $postBody 
  68. * @param array $optParams Optional parameters. 
  69. * @return Google_Member 
  70. */ 
  71. public function patch($groupKey, $memberKey, Google_Member $postBody, $optParams = array()) { 
  72. $params = array('groupKey' => $groupKey, 'memberKey' => $memberKey, 'postBody' => $postBody); 
  73. $params = array_merge($params, $optParams); 
  74. $data = $this->__call('patch', array($params)); 
  75. if ($this->useObjects()) { 
  76. return new Google_Member($data); 
  77. } else { 
  78. return $data; 
  79. /** 
  80. * Update membership of a user in the specified group. (members.update) 
  81. * @param string $groupKey Email or immutable Id of the group. If Id, it should match with id of group object 
  82. * @param string $memberKey Email or immutable Id of the user. If Id, it should match with id of member object 
  83. * @param Google_Member $postBody 
  84. * @param array $optParams Optional parameters. 
  85. * @return Google_Member 
  86. */ 
  87. public function update($groupKey, $memberKey, Google_Member $postBody, $optParams = array()) { 
  88. $params = array('groupKey' => $groupKey, 'memberKey' => $memberKey, 'postBody' => $postBody); 
  89. $params = array_merge($params, $optParams); 
  90. $data = $this->__call('update', array($params)); 
  91. if ($this->useObjects()) { 
  92. return new Google_Member($data); 
  93. } else { 
  94. return $data;