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
CreateUserApiRequest
builder object - See Also:
-
deactivate
Deactivate a user.- Parameters:
userId
- The id of the user to deactivate- Returns:
- The
DeactivateUserApiRequest
builder object - See Also:
-
deactivateOwnUser
Deactivates the user who invokes this endpoint.- Returns:
- The
DeactivateOwnUserApiRequest
builder object - See Also:
-
reactivate
Reactivates a user.- Parameters:
userId
- The user id to reactivate- Returns:
- The
ReactivateUserApiRequest
builder 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
SetTypingStatusApiRequest
builder 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
SetTypingStatusApiRequest
builder 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
SetTypingStatusForMessageEditApiRequest
builder 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
CreateUserGroupApiRequest
builder object - See Also:
-
deactivateUserGroup
Deactivates a user group.- Parameters:
groupId
- The id of the user group to deactivate- Returns:
- The
DeactivateUserGroupApiRequest
builder object - See Also:
-
updateUserGroup
Updates a user group.- Parameters:
groupId
- The id of the group to update- Returns:
- The
UpdateUserGroupApiRequest
builder 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
UpdateUserGroupApiRequest
builder 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
AddUsersToGroupApiRequest
builder 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
RemoveUsersFromGroupApiRequest
builder object - See Also:
-
getUserGroups
Get all user groups.- Returns:
- The
GetUserGroupsApiRequest
builder object - See Also:
-
getUserGroupMembers
Get user group members.- Parameters:
userGroupId
- The id of the user group to fetch members from- Returns:
- The
GetUserGroupMembersApiRequest
builder 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
GetUserGroupMembershipStatusApiRequest
builder object - See Also:
-
updateNotificationSettings
Deprecated.Update user notification settings.- Returns:
- The
UpdateNotificationSettingsApiRequest
builder object - See Also:
-
getOwnUser
Get information about the user who invokes this endpoint- Returns:
- The
GetOwnUserApiRequest
builder object - See Also:
-
getAllUsers
Gets all users.- Returns:
- The
GetAllUsersApiRequest
builder object - See Also:
-
getUser
Gets a user by id.- Parameters:
userId
- The id of the user to get- Returns:
- The
GetUserApiRequest
builder 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
GetUserApiRequest
builder object - See Also:
-
updateUser
Update a user.- Parameters:
userId
- The id of the user to update- Returns:
- The
UpdateUserApiRequest
builder object - See Also:
-
updateUser
Update a user by their email address.- Parameters:
email
- The email address of the user to update- Returns:
- The
UpdateUserByEmailApiRequest
builder object - See Also:
-
getUserPresence
Get user presence information.- Parameters:
email
- The email address of the user to get presence details for- Returns:
- The
GetUserPresenceApiRequest
builder object - See Also:
-
getAllUserPresence
Gets all user presence details.- Returns:
- The
GetAllUserPresenceApiRequest
builder object - See Also:
-
updateOwnUserPresence
Fetches presence details for the current client user.- Parameters:
status
- The status of the user- Returns:
- The
UpdateOwnUserPresenceApiRequest
builder object - See Also:
-
getUserAttachments
Get user attachments.- Returns:
- The
GetUserAttachmentsApiRequest
builder object - See Also:
-
deleteAttachment
Deletes an attachment.- Parameters:
attachmentId
- The id of the attachment to delete- Returns:
- The
DeleteUserAttachmentApiRequest
builder object - See Also:
-
mute
Mute a user.- Parameters:
userId
- The id of the user to mute- Returns:
- The
MuteUserApiRequest
builder object - See Also:
-
updateOwnUserStatus
Updates aspects of the status for the user who invokes this endpoint.- Returns:
- The
UpdateOwnUserStatusApiRequest
builder object - See Also:
-
updateOwnUserSettings
Updates settings for the user who invokes this endpoint.- Returns:
- The
UpdateOwnUserSettingsApiRequest
builder object - See Also:
-
unmute
Unmute a user.- Parameters:
userId
- The id of the user to unmute- Returns:
- The
UnmuteUserApiRequest
builder object - See Also:
-
getSubGroupsOfUserGroup
Get the subgroups of a user group.- Parameters:
userGroupId
- The ID of the user group- Returns:
- The
GetSubGroupsOfUserGroupApiRequest
builder object - See Also:
-
updateUserGroupSubGroups
Updates user group sub groups.- Parameters:
userGroupId
- The ID of the user group to update- Returns:
- The
UpdateUserGroupSubGroupsApiRequest
builder 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
AddAlertWordsApiRequest
builder object - See Also:
-
getAllAlertWords
Gets all user alert words.- Returns:
- The
GetAllAlertWordsApiRequest
builder 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
RemoveAlertWordsApiRequest
builder object - See Also:
-
getUserStatus
Gets a user status.- Parameters:
userId
- The ID of the user to fetch the status for- Returns:
- The
GetUserStatusApiRequest
builder object - See Also:
-