Class UserService
java.lang.Object
com.github.jamesnetherton.zulip.client.api.user.UserService
- All Implemented Interfaces:
ZulipService
Zulip user APIs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAlertWords(String... alertWords) Adds user alert words.addUsersToGroup(long groupId, long... userIds) Add sers to a group.createUser(String email, String fullName, String password) Create a new user.createUserGroup(String name, String description, long... userIds) Create a new user group.deactivate(long userId) Deactivate a user.Deactivates the user who invokes this endpoint.deactivateUserGroup(long groupId) Deactivates a user group.deleteAttachment(long attachmentId) Deletes an attachment.Gets all user alert words.Gets all user presence details.Gets all users.Get information about the user who invokes this endpointgetSubGroupsOfUserGroup(long userGroupId) Get the subgroups of a user group.getUser(long userId) Gets a user by id.Gets a user by the given Zulip display email address.Get user attachments.getUserGroupMembers(long userGroupId) Get user group members.getUserGroupMembershipStatus(long userGroupId, long userId) Check whether a user is member of a user group.Get all user groups.getUserPresence(String email) Get user presence information.getUserStatus(long userId) Gets a user status.mute(long userId) Mute a user.reactivate(long userId) Reactivates a user.removeAlertWords(String... alertWords) Removes user alert words.removeUsersFromGroup(long groupId, long... userIds) Remove users from a group.setTyping(TypingOperation operation, long... userIds) Sets user 'typing' statussetTyping(TypingOperation operation, long streamId, String topic) Sets user 'typing' statussetTypingForMessageEdit(long messageId, TypingOperation operation) Notifies other users whether the current user is editing a messageunmute(long userId) Unmute a user.Deprecated.Fetches presence details for the current client user.Updates settings for the user who invokes this endpoint.Updates aspects of the status for the user who invokes this endpoint.updateUser(long userId) Update a user.updateUser(String email) Update a user by their email address.updateUserGroup(long groupId) Updates a user group.updateUserGroup(String name, String description, long groupId) Updates a user group.updateUserGroupSubGroups(long userGroupId) Updates user group sub groups.
-
Constructor Details
-
UserService
Constructs aUserService.- Parameters:
client- The Zulip HTTP client
-
-
Method Details
-
createUser
Create a new user.- Parameters:
email- The email address of the new userfullName- The name of the new userpassword- The password of the new user- Returns:
- The
CreateUserApiRequestbuilder object - See Also:
-
deactivate
Deactivate a user.- Parameters:
userId- The id of the user to deactivate- Returns:
- The
DeactivateUserApiRequestbuilder object - See Also:
-
deactivateOwnUser
Deactivates the user who invokes this endpoint.- Returns:
- The
DeactivateOwnUserApiRequestbuilder object - See Also:
-
reactivate
Reactivates a user.- Parameters:
userId- The user id to reactivate- Returns:
- The
ReactivateUserApiRequestbuilder object - See Also:
-
setTyping
Sets user 'typing' status- Parameters:
operation- The typing operation to applyuserIds- Array of user ids to add to set the typing status for- Returns:
- The
SetTypingStatusApiRequestbuilder object - See Also:
-
setTyping
Sets user 'typing' status- Parameters:
operation- The typing operation to applystreamId- The id of the stream in which the message is being typedtopic- The name of the topic in which the message is being typed- Returns:
- The
SetTypingStatusApiRequestbuilder object - See Also:
-
setTypingForMessageEdit
public SetTypingStatusForMessageEditApiRequest setTypingForMessageEdit(long messageId, TypingOperation operation) Notifies other users whether the current user is editing a message- Parameters:
messageId- The id of the message being editedoperation- The typing operation to apply- Returns:
- The
SetTypingStatusForMessageEditApiRequestbuilder object - See Also:
-
createUserGroup
Create a new user group.- Parameters:
name- The name of the user groupdescription- The user group descriptionuserIds- Array of user ids to add to the group- Returns:
- The
CreateUserGroupApiRequestbuilder object - See Also:
-
deactivateUserGroup
Deactivates a user group.- Parameters:
groupId- The id of the user group to deactivate- Returns:
- The
DeactivateUserGroupApiRequestbuilder object - See Also:
-
updateUserGroup
Updates a user group.- Parameters:
groupId- The id of the group to update- Returns:
- The
UpdateUserGroupApiRequestbuilder object - See Also:
-
updateUserGroup
Updates a user group.- Parameters:
name- The updated name of the user groupdescription- The updated description of the user groupgroupId- The id of the group to update- Returns:
- The
UpdateUserGroupApiRequestbuilder object - See Also:
-
addUsersToGroup
Add sers to a group.- Parameters:
groupId- The id of the group to add users touserIds- Array of user ids to add to the group- Returns:
- The
AddUsersToGroupApiRequestbuilder object - See Also:
-
removeUsersFromGroup
Remove users from a group.- Parameters:
groupId- The id of the group to remove users fromuserIds- Array of user ids to remove from the group- Returns:
- The
RemoveUsersFromGroupApiRequestbuilder object - See Also:
-
getUserGroups
Get all user groups.- Returns:
- The
GetUserGroupsApiRequestbuilder object - See Also:
-
getUserGroupMembers
Get user group members.- Parameters:
userGroupId- The id of the user group to fetch members from- Returns:
- The
GetUserGroupMembersApiRequestbuilder object - See Also:
-
getUserGroupMembershipStatus
public GetUserGroupMembershipStatusApiRequest getUserGroupMembershipStatus(long userGroupId, long userId) Check whether a user is member of a user group.- Parameters:
userGroupId- The id of the user group on which the user belongsuserId- The id of the user- Returns:
- The
GetUserGroupMembershipStatusApiRequestbuilder object - See Also:
-
updateNotificationSettings
Deprecated.Update user notification settings.- Returns:
- The
UpdateNotificationSettingsApiRequestbuilder object - See Also:
-
getOwnUser
Get information about the user who invokes this endpoint- Returns:
- The
GetOwnUserApiRequestbuilder object - See Also:
-
getAllUsers
Gets all users.- Returns:
- The
GetAllUsersApiRequestbuilder object - See Also:
-
getUser
Gets a user by id.- Parameters:
userId- The id of the user to get- Returns:
- The
GetUserApiRequestbuilder object - See Also:
-
getUser
Gets a user by the given Zulip display email address.- Parameters:
email- The Zulip display email address of the user to get- Returns:
- The
GetUserApiRequestbuilder object - See Also:
-
updateUser
Update a user.- Parameters:
userId- The id of the user to update- Returns:
- The
UpdateUserApiRequestbuilder object - See Also:
-
updateUser
Update a user by their email address.- Parameters:
email- The email address of the user to update- Returns:
- The
UpdateUserByEmailApiRequestbuilder object - See Also:
-
getUserPresence
Get user presence information.- Parameters:
email- The email address of the user to get presence details for- Returns:
- The
GetUserPresenceApiRequestbuilder object - See Also:
-
getAllUserPresence
Gets all user presence details.- Returns:
- The
GetAllUserPresenceApiRequestbuilder object - See Also:
-
updateOwnUserPresence
Fetches presence details for the current client user.- Parameters:
status- The status of the user- Returns:
- The
UpdateOwnUserPresenceApiRequestbuilder object - See Also:
-
getUserAttachments
Get user attachments.- Returns:
- The
GetUserAttachmentsApiRequestbuilder object - See Also:
-
deleteAttachment
Deletes an attachment.- Parameters:
attachmentId- The id of the attachment to delete- Returns:
- The
DeleteUserAttachmentApiRequestbuilder object - See Also:
-
mute
Mute a user.- Parameters:
userId- The id of the user to mute- Returns:
- The
MuteUserApiRequestbuilder object - See Also:
-
updateOwnUserStatus
Updates aspects of the status for the user who invokes this endpoint.- Returns:
- The
UpdateOwnUserStatusApiRequestbuilder object - See Also:
-
updateOwnUserSettings
Updates settings for the user who invokes this endpoint.- Returns:
- The
UpdateOwnUserSettingsApiRequestbuilder object - See Also:
-
unmute
Unmute a user.- Parameters:
userId- The id of the user to unmute- Returns:
- The
UnmuteUserApiRequestbuilder object - See Also:
-
getSubGroupsOfUserGroup
Get the subgroups of a user group.- Parameters:
userGroupId- The ID of the user group- Returns:
- The
GetSubGroupsOfUserGroupApiRequestbuilder object - See Also:
-
updateUserGroupSubGroups
Updates user group sub groups.- Parameters:
userGroupId- The ID of the user group to update- Returns:
- The
UpdateUserGroupSubGroupsApiRequestbuilder object - See Also:
-
addAlertWords
Adds user alert words.- Parameters:
alertWords- An array of strings, where each string is an alert word (or phrase)- Returns:
- The
AddAlertWordsApiRequestbuilder object - See Also:
-
getAllAlertWords
Gets all user alert words.- Returns:
- The
GetAllAlertWordsApiRequestbuilder object - See Also:
-
removeAlertWords
Removes user alert words.- Parameters:
alertWords- An array of strings, where each string is an alert word (or phrase)- Returns:
- The
RemoveAlertWordsApiRequestbuilder object - See Also:
-
getUserStatus
Gets a user status.- Parameters:
userId- The ID of the user to fetch the status for- Returns:
- The
GetUserStatusApiRequestbuilder object - See Also:
-