Class GetUserGroupMembershipStatusApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.GetUserGroupMembershipStatusApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<Boolean>
public class GetUserGroupMembershipStatusApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<Boolean>
Check whether a user is member of user group.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGetUserGroupMembershipStatusApiRequest
(ZulipHttpClient client, long userGroupId, long userId) Constructs aGetUserGroupMembershipStatusApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the Zulip API request for getting members of a user group.withDirectMemberOnly
(boolean isDirectMemberOnly) Sets Whether to consider only the direct members of user group.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
DIRECT_MEMBER_ONLY
- See Also:
-
-
Constructor Details
-
GetUserGroupMembershipStatusApiRequest
public GetUserGroupMembershipStatusApiRequest(ZulipHttpClient client, long userGroupId, long userId) Constructs aGetUserGroupMembershipStatusApiRequest
.- Parameters:
client
- The Zulip HTTP clientuserGroupId
- The id of the user groupuserId
- The id of the user
-
-
Method Details
-
withDirectMemberOnly
Sets Whether to consider only the direct members of user group.- Parameters:
isDirectMemberOnly
-true
to consider only direct members of the user group.false
to not consider direct members of the user group- Returns:
- This
GetUserGroupMembershipStatusApiRequest
instance
-
execute
Executes the Zulip API request for getting members of a user group.- Specified by:
execute
in interfaceExecutableApiRequest<Boolean>
- Returns:
- Whether the user is a member of the specified group
- Throws:
ZulipClientException
- if the request was not successful
-