-
- All Known Implementing Classes:
MattermostClient
public interface ChannelApiChannel API.- Author:
- Takayuki Maruyama
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ApiResponse<ChannelMember>addChannelMember(String channelId, String userId)adds user to channel and return a channel memner.ApiResponse<ChannelList>autocompleteChannels(String teamId, String searchTerm)autocomplete channels in team based on search term.ApiResponse<ChannelList>autocompleteChannelsForSearch(String teamId, String searchTerm)autocomplete your (joined) channels in team based on search term.ApiResponse<Channel>convertChannelToPrivate(String channelId)convert channel from public to private.ApiResponse<Channel>createChannel(Channel channel)creates a channel based on the provided channel object.ApiResponse<Channel>createDirectChannel(String userId1, String userId2)creates a direct message channel based on the two user ids provided.ApiResponse<Channel>createGroupChannel(String... userIds)creates a group message channel based on userIds provided.default ApiResponse<Channel>createGroupChannel(Collection<String> userIds)creates a group message channel based on userIds provided.ApiResponse<Boolean>deleteChannel(String channelId)deletes channel based on the provided channel id string.default ApiResponse<Channel>getChannel(String channelId)returns a channel based on the provided channel id string.ApiResponse<Channel>getChannel(String channelId, String etag)returns a channel based on the provided channel id string.default ApiResponse<Channel>getChannelByName(String channelName, String teamId)returns a channel based on the provided channel name and team id strings.ApiResponse<Channel>getChannelByName(String channelName, String teamId, String etag)returns a channel based on the provided channel name and team id strings.default ApiResponse<Channel>getChannelByNameForTeamName(String channelName, String teamName)returns a channel based on the provided channel name and team name strings.ApiResponse<Channel>getChannelByNameForTeamName(String channelName, String teamName, String etag)returns a channel based on the provided channel name and team name strings.default ApiResponse<ChannelMember>getChannelMember(String channelId, String userId)gets a channel memner.ApiResponse<ChannelMember>getChannelMember(String channelId, String userId, String etag)gets a channel memner.default ApiResponse<ChannelMembers>getChannelMembers(String channelId)gets a page of channel members.default ApiResponse<ChannelMembers>getChannelMembers(String channelId, Pager pager)gets a page of channel members.ApiResponse<ChannelMembers>getChannelMembers(String channelId, Pager pager, String etag)gets a page of channel members.ApiResponse<ChannelMembers>getChannelMembersByIds(String channelId, String... userIds)gets the channel members in a channel for a list of user ids.default ApiResponse<ChannelMembers>getChannelMembersByIds(String channelId, Collection<String> userIds)gets the channel members in a channel for a list of user ids.default ApiResponse<ChannelMembers>getChannelMembersForUser(String userId, String teamId)gets all the channel members for a user on a team.ApiResponse<ChannelMembers>getChannelMembersForUser(String userId, String teamId, String etag)gets all the channel members for a user on a team.default ApiResponse<ChannelList>getChannelsForTeamForUser(String teamId, String userId)returns a list channels of on a team for user.ApiResponse<ChannelList>getChannelsForTeamForUser(String teamId, String userId, String etag)returns a list channels of on a team for user.default ApiResponse<ChannelStats>getChannelStats(String channelId)returns statistics for a channel.ApiResponse<ChannelStats>getChannelStats(String channelId, String etag)returns statistics for a channel.ApiResponse<ChannelUnread>getChannelUnread(String channelId, String userId)will return a ChannelUnread object that contains the number ofo unread messages and mentions for a user.default ApiResponse<ChannelList>getDeletedChannels(String teamId)ApiResponse<ChannelList>getDeletedChannels(String teamId, Pager pager)default ApiResponse<PostList>getPinnedPosts(String channelId)gets a list of pinned posts.ApiResponse<PostList>getPinnedPosts(String channelId, String etag)gets a list of pinned posts.ApiResponse<ChannelList>getPublicChannelsByIdsForTeam(String teamId, String... channelIds)returns a list of public channeld based on provided team id string.default ApiResponse<ChannelList>getPublicChannelsByIdsForTeam(String teamId, Collection<String> channelIds)returns a list of public channeld based on provided team id string.default ApiResponse<ChannelList>getPublicChannelsForTeam(String teamId)returns a list of public channels based on the provided team id string.default ApiResponse<ChannelList>getPublicChannelsForTeam(String teamId, Pager pager)returns a list of public channels based on the provided team id string.ApiResponse<ChannelList>getPublicChannelsForTeam(String teamId, Pager pager, String etag)returns a list of public channels based on the provided team id string.ApiResponse<Channel>patchChannel(String channelId, ChannelPatch patch)partially updates a channel.ApiResponse<Boolean>removeUserFromChannel(String channelId, String userId)will delete the channel member object for a user, effectively removing the user from a channel.ApiResponse<Channel>restoreChannel(String channelId)ApiResponse<ChannelList>searchChannels(String teamId, ChannelSearch search)returns the channels on a team matching the provided search term.ApiResponse<Channel>updateChannel(Channel channel)update a channel based on the provided channel object.ApiResponse<Boolean>updateChannelNotifyProps(String channeLId, String userId, Map<String,String> props)will update the notification properties on a channel for a user.default ApiResponse<Boolean>updateChannelRoles(String channelId, String userId, Collection<Role> roles)will update the roles on a channel for a user.ApiResponse<Boolean>updateChannelRoles(String channelId, String userId, Role... roles)will update the roles on a channel for a user.ApiResponse<ChannelViewResponse>viewChannel(String userId, ChannelView view)performs a view action for a user.
-
-
-
Method Detail
-
createChannel
ApiResponse<Channel> createChannel(Channel channel)
creates a channel based on the provided channel object.
-
updateChannel
ApiResponse<Channel> updateChannel(Channel channel)
update a channel based on the provided channel object.
-
patchChannel
ApiResponse<Channel> patchChannel(String channelId, ChannelPatch patch)
partially updates a channel. Any missing fields are not updated.
-
createDirectChannel
ApiResponse<Channel> createDirectChannel(String userId1, String userId2)
creates a direct message channel based on the two user ids provided.
-
createGroupChannel
default ApiResponse<Channel> createGroupChannel(Collection<String> userIds)
creates a group message channel based on userIds provided.
-
createGroupChannel
ApiResponse<Channel> createGroupChannel(String... userIds)
creates a group message channel based on userIds provided.
-
getChannel
default ApiResponse<Channel> getChannel(String channelId)
returns a channel based on the provided channel id string.
-
getChannel
ApiResponse<Channel> getChannel(String channelId, String etag)
returns a channel based on the provided channel id string.
-
getChannelStats
default ApiResponse<ChannelStats> getChannelStats(String channelId)
returns statistics for a channel.
-
getChannelStats
ApiResponse<ChannelStats> getChannelStats(String channelId, String etag)
returns statistics for a channel.
-
getPinnedPosts
default ApiResponse<PostList> getPinnedPosts(String channelId)
gets a list of pinned posts.
-
getPinnedPosts
ApiResponse<PostList> getPinnedPosts(String channelId, String etag)
gets a list of pinned posts.
-
getPublicChannelsForTeam
default ApiResponse<ChannelList> getPublicChannelsForTeam(String teamId)
returns a list of public channels based on the provided team id string.
-
getPublicChannelsForTeam
default ApiResponse<ChannelList> getPublicChannelsForTeam(String teamId, Pager pager)
returns a list of public channels based on the provided team id string.
-
getPublicChannelsForTeam
ApiResponse<ChannelList> getPublicChannelsForTeam(String teamId, Pager pager, String etag)
returns a list of public channels based on the provided team id string.
-
getPublicChannelsByIdsForTeam
default ApiResponse<ChannelList> getPublicChannelsByIdsForTeam(String teamId, Collection<String> channelIds)
returns a list of public channeld based on provided team id string.
-
getPublicChannelsByIdsForTeam
ApiResponse<ChannelList> getPublicChannelsByIdsForTeam(String teamId, String... channelIds)
returns a list of public channeld based on provided team id string.
-
getChannelsForTeamForUser
default ApiResponse<ChannelList> getChannelsForTeamForUser(String teamId, String userId)
returns a list channels of on a team for user.
-
getChannelsForTeamForUser
ApiResponse<ChannelList> getChannelsForTeamForUser(String teamId, String userId, String etag)
returns a list channels of on a team for user.
-
searchChannels
ApiResponse<ChannelList> searchChannels(String teamId, ChannelSearch search)
returns the channels on a team matching the provided search term.
-
deleteChannel
ApiResponse<Boolean> deleteChannel(String channelId)
deletes channel based on the provided channel id string.
-
getChannelByName
default ApiResponse<Channel> getChannelByName(String channelName, String teamId)
returns a channel based on the provided channel name and team id strings.
-
getChannelByName
ApiResponse<Channel> getChannelByName(String channelName, String teamId, String etag)
returns a channel based on the provided channel name and team id strings.
-
getChannelByNameForTeamName
default ApiResponse<Channel> getChannelByNameForTeamName(String channelName, String teamName)
returns a channel based on the provided channel name and team name strings.
-
getChannelByNameForTeamName
ApiResponse<Channel> getChannelByNameForTeamName(String channelName, String teamName, String etag)
returns a channel based on the provided channel name and team name strings.
-
getChannelMembers
default ApiResponse<ChannelMembers> getChannelMembers(String channelId)
gets a page of channel members.
-
getChannelMembers
default ApiResponse<ChannelMembers> getChannelMembers(String channelId, Pager pager)
gets a page of channel members.
-
getChannelMembers
ApiResponse<ChannelMembers> getChannelMembers(String channelId, Pager pager, String etag)
gets a page of channel members.
-
getChannelMembersByIds
default ApiResponse<ChannelMembers> getChannelMembersByIds(String channelId, Collection<String> userIds)
gets the channel members in a channel for a list of user ids.
-
getChannelMembersByIds
ApiResponse<ChannelMembers> getChannelMembersByIds(String channelId, String... userIds)
gets the channel members in a channel for a list of user ids.
-
getChannelMember
default ApiResponse<ChannelMember> getChannelMember(String channelId, String userId)
gets a channel memner.
-
getChannelMember
ApiResponse<ChannelMember> getChannelMember(String channelId, String userId, String etag)
gets a channel memner.
-
getChannelMembersForUser
default ApiResponse<ChannelMembers> getChannelMembersForUser(String userId, String teamId)
gets all the channel members for a user on a team.
-
getChannelMembersForUser
ApiResponse<ChannelMembers> getChannelMembersForUser(String userId, String teamId, String etag)
gets all the channel members for a user on a team.
-
viewChannel
ApiResponse<ChannelViewResponse> viewChannel(String userId, ChannelView view)
performs a view action for a user. synonymous with switching channels or marking channels as read by a user.
-
getChannelUnread
ApiResponse<ChannelUnread> getChannelUnread(String channelId, String userId)
will return a ChannelUnread object that contains the number ofo unread messages and mentions for a user.
-
updateChannelRoles
default ApiResponse<Boolean> updateChannelRoles(String channelId, String userId, Collection<Role> roles)
will update the roles on a channel for a user.
-
updateChannelRoles
ApiResponse<Boolean> updateChannelRoles(String channelId, String userId, Role... roles)
will update the roles on a channel for a user.
-
updateChannelNotifyProps
ApiResponse<Boolean> updateChannelNotifyProps(String channeLId, String userId, Map<String,String> props)
will update the notification properties on a channel for a user.
-
addChannelMember
ApiResponse<ChannelMember> addChannelMember(String channelId, String userId)
adds user to channel and return a channel memner.
-
removeUserFromChannel
ApiResponse<Boolean> removeUserFromChannel(String channelId, String userId)
will delete the channel member object for a user, effectively removing the user from a channel.
-
restoreChannel
ApiResponse<Channel> restoreChannel(String channelId)
-
getDeletedChannels
default ApiResponse<ChannelList> getDeletedChannels(String teamId)
-
getDeletedChannels
ApiResponse<ChannelList> getDeletedChannels(String teamId, Pager pager)
-
convertChannelToPrivate
ApiResponse<Channel> convertChannelToPrivate(String channelId)
convert channel from public to private.
-
autocompleteChannels
ApiResponse<ChannelList> autocompleteChannels(String teamId, String searchTerm)
autocomplete channels in team based on search term.- Since:
- Mattermost Server 4.7
-
autocompleteChannelsForSearch
ApiResponse<ChannelList> autocompleteChannelsForSearch(String teamId, String searchTerm)
autocomplete your (joined) channels in team based on search term.- Since:
- Mattermost Server 5.4
-
-