diff options
Diffstat (limited to 'app/Api/GroupMemberApi.php')
-rw-r--r-- | app/Api/GroupMemberApi.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/Api/GroupMemberApi.php b/app/Api/GroupMemberApi.php new file mode 100644 index 00000000..f5171e23 --- /dev/null +++ b/app/Api/GroupMemberApi.php @@ -0,0 +1,39 @@ +<?php + +namespace Kanboard\Api; + +use Kanboard\Core\Base; + +/** + * Group Member API controller + * + * @package Kanboard\Api + * @author Frederic Guillot + */ +class GroupMemberApi extends Base +{ + public function getMemberGroups($user_id) + { + return $this->groupMember->getGroups($user_id); + } + + public function getGroupMembers($group_id) + { + return $this->groupMember->getMembers($group_id); + } + + public function addGroupMember($group_id, $user_id) + { + return $this->groupMember->addUser($group_id, $user_id); + } + + public function removeGroupMember($group_id, $user_id) + { + return $this->groupMember->removeUser($group_id, $user_id); + } + + public function isGroupMember($group_id, $user_id) + { + return $this->groupMember->isMember($group_id, $user_id); + } +} |