public class GroupResource extends BaseResource
apiClient, baseUrl, MAX_RESULTS, OM| Constructor and Description |
|---|
GroupResource(GroupsIOApiClient apiClient,
String baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
createSubGroup(Integer groupId,
String name,
String description,
String privacy) |
void |
deleteGroup(Integer groupId) |
Group |
getGroup(Integer groupId)
Gets a
Group for the specified group ID |
Permissions |
getPermissions(Integer groupId)
Gets a user's
Permissions for the specified group ID |
List<Group> |
getSubgroups(Integer groupId)
Gets a list of groups for a given group ID
|
Group |
updateGroup(Group group)
Update a group given a blank
Group object with only the updated
fields set. |
callApi, callApi, loginpublic GroupResource(GroupsIOApiClient apiClient, String baseUrl)
public Permissions getPermissions(Integer groupId) throws URISyntaxException, IOException, GroupsIOApiException
Permissions for the specified group IDPermissions for the specified group IDURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic Group getGroup(Integer groupId) throws URISyntaxException, IOException, GroupsIOApiException
Group for the specified group IDGroup for the specified group IDURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic List<Group> getSubgroups(Integer groupId) throws URISyntaxException, IOException, GroupsIOApiException
groupId - to fetch subgroups forList<Group> belonging to a parent group.URISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic void createSubGroup(Integer groupId, String name, String description, String privacy)
public Group updateGroup(Group group) throws URISyntaxException, IOException, GroupsIOApiException
Group object with only the updated
fields set.
Example:
final Group groupToUpdate = new Group();
groupToUpdate.setWebsite("https://github.com/nightowlengineer/groupsio-api-java");
final Group updatedGroup = client.group().updateGroup(groupToUpdate);
group - - with only the updated fields setGroup after a successful updateURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic void deleteGroup(Integer groupId)
Copyright © 2017–2018. All rights reserved.