Class GetUserGroupMembersApiRequest

java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.GetUserGroupMembersApiRequest
All Implemented Interfaces:
ExecutableApiRequest<List<Long>>

public class GetUserGroupMembersApiRequest extends ZulipApiRequest implements ExecutableApiRequest<List<Long>>
Zulip API request builder for getting the members of a user group.
See Also:
  • Field Details

  • Constructor Details

    • GetUserGroupMembersApiRequest

      public GetUserGroupMembersApiRequest(ZulipHttpClient client, long userGroupId)
      Parameters:
      client - The Zulip HTTP client
      userGroupId - The id of the user group from which to get members
  • Method Details

    • withDirectMemberOnly

      public GetUserGroupMembersApiRequest withDirectMemberOnly(boolean isDirectMemberOnly)
      Sets Whether to consider only the direct members of user group and not members of its subgroups.
      Parameters:
      isDirectMemberOnly - true to consider only direct members of the user group. false to not consider direct members of the user group
      Returns:
      This GetUserGroupMembersApiRequest instance
    • execute

      public List<Long> execute() throws ZulipClientException
      Executes the Zulip API request for getting members of a user group.
      Specified by:
      execute in interface ExecutableApiRequest<List<Long>>
      Returns:
      The user IDs for the members of the user group
      Throws:
      ZulipClientException - if the request was not successful