Slack v0.23.5 Slack.Web.Im View Source
Link to this section Summary
Functions
Close a direct message channel
Fetches history of messages and events from direct message channel
Lists direct message channels for the calling user
Sets the read cursor in a direct message channel
Opens a direct message channel
Retrieve a thread of messages posted to a direct message conversation
Link to this section Functions
close(channel, optional_params \\ %{}) View Source
Close a direct message channel.
Required Params
channel
- Direct message channel to close.
Errors the API can return:
channel_not_found
- Value passed forchannel
was invalid.user_does_not_own_channel
- Calling user does not own this DM channel.
history(channel, optional_params \\ %{}) View Source
Fetches history of messages and events from direct message channel.
Required Params
channel
- Direct message channel to fetch history for.
Optional Params
count
- Number of messages to return, between 1 and 1000. ex:100
inclusive
- Include messages with latest or oldest timestamp in results. ex:1
latest
- End of time range of messages to include in results.oldest
- Start of time range of messages to include in results.unreads
- Includeunread_count_display
in the output? ex:1
Errors the API can return:
channel_not_found
- Value passed forchannel
was invalid.invalid_ts_latest
- Value passed forlatest
was invalidinvalid_ts_oldest
- Value passed foroldest
was invalid
list(optional_params \\ %{}) View Source
Lists direct message channels for the calling user.
mark(channel, ts, optional_params \\ %{}) View Source
Sets the read cursor in a direct message channel.
Required Params
channel
- Direct message channel to set reading cursor in.ts
- Timestamp of the most recently seen message.
Errors the API can return:
channel_not_found
- Value passed forchannel
was invalid.invalid_timestamp
- Value passed fortimestamp
was invalid.not_in_channel
- Caller is not a member of the channel.
open(user, optional_params \\ %{}) View Source
Opens a direct message channel.
Required Params
user
- User to open a direct message channel with.
Errors the API can return:
user_disabled
- Theuser
has been disabled.user_not_found
- Value passed foruser
was invalid.user_not_visible
- The calling user is restricted from seeing the requested user.
replies(channel, thread_ts, optional_params \\ %{}) View Source
Retrieve a thread of messages posted to a direct message conversation.
Required Params
channel
- Direct message channel to fetch thread fromthread_ts
- Unique identifier of a thread's parent message.
Errors the API can return:
channel_not_found
- Value passed forchannel
was invalid.thread_not_found
- Value for thread_ts was missing or invalid.