Commit 990acdeb authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

groups endpoints documentation

parent cfbab6f2
......@@ -20,9 +20,22 @@ use Source\UseCases\Groups\UpdateGroup\APIPresenter as UpdateGroupAPIPresenter;
use Source\UseCases\DoorGroup\GetGroupDoors\APIPresenter as GetGroupDoorsAPIPresenter;
use Source\UseCases\GroupUser\GetGroupUsers\APIPresenter as GetGroupUsersAPIPresenter;
/**
* @group Group Management
*
* This set of endpoints deals with the management of groups in the system.
*/
class GroupsController extends ApiController
{
/**
* Create Group
*
* Adds a new group to the system.
*
* @authenticated
* @bodyParam title string required The title of the group. Must be unique.
* @bodyParam description string The group description for management.
*
* @param \Source\UseCases\Groups\CreateGroup\CreateGroupUseCase $useCase
* @return \Illuminate\Http\JsonResponse
* @throws \Source\Exceptions\AuthorizationException
......@@ -47,6 +60,12 @@ class GroupsController extends ApiController
}
/**
* Delete Group
*
* This endpoint removes a group from the system.
*
* @authenticated
*
* @param \Source\UseCases\Groups\DeleteGroup\DeleteGroupUseCase $useCase
* @param string $groupId
* @return \Illuminate\Http\JsonResponse
......@@ -69,6 +88,14 @@ class GroupsController extends ApiController
}
/**
* Get Groups
*
* This endpoint searches groups. If no parameters are given a paginated list of all groups is returned.
*
* @authenticated
* @paginated
* @queryParam query This parameter filters groups on title and description. Example: manage
*
* @param \Source\UseCases\Groups\GetGroups\GetGroupsUseCase $useCase
* @return \Illuminate\Http\JsonResponse
* @throws \Source\Exceptions\AuthorizationException
......@@ -93,6 +120,13 @@ class GroupsController extends ApiController
}
/**
* Get Group
*
* This endpoint gets a groups.
*
* @authenticated
* @urlParam groupId required The ID of the group to get all information from.
*
* @param \Source\UseCases\Groups\GetGroup\GetGroupUseCase $useCase
* @param string $groupId
* @return \Illuminate\Http\JsonResponse
......@@ -111,6 +145,15 @@ class GroupsController extends ApiController
}
/**
* Update Group
*
* This route updates a group stored in the system. Title's must be unique. Default permission group's titles cannot
* be modified.
*
* @authenticated
* @bodyParam title string required The new title of the group.
* @bodyParam description string required The new group description.
*
* @param \Source\UseCases\Groups\UpdateGroup\UpdateGroupUseCase $useCase
* @param string $groupId
* @return \Illuminate\Http\JsonResponse
......@@ -139,6 +182,14 @@ class GroupsController extends ApiController
}
/**
* Users for Group
*
* This endpoint gets all users attached to a specific group.
*
* @authenticated
* @paginated
* @urlParam groupId required The group to get users for. Example: 1
*
* @param \Source\UseCases\GroupUser\GetGroupUsers\GetGroupUsersUseCase $useCase
* @param string $groupId
* @return \Illuminate\Http\JsonResponse
......@@ -157,6 +208,14 @@ class GroupsController extends ApiController
}
/**
* Doors for Group
*
* This endpoint gets all doors attached to a specific group.
*
* @authenticated
* @paginated
* @urlParam groupId required The group to get attached doors for. Example: 8
*
* @param \Source\UseCases\DoorGroup\GetGroupDoors\GetGroupDoorsUseCase $groupDoors
* @param string $groupId
* @return \Illuminate\Http\JsonResponse
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment