lib/slack/web/api/endpoints/im.rb in slack-ruby-client-0.14.1 vs lib/slack/web/api/endpoints/im.rb in slack-ruby-client-0.14.2
- old
+ new
@@ -4,11 +4,11 @@
module Web
module Api
module Endpoints
module Im
#
- # Close a direct message channel.
+ # This method closes a direct message channel.
#
# @option options [im] :channel
# Direct message channel to close.
# @see https://api.slack.com/methods/im.close
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.close.json
@@ -17,11 +17,13 @@
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
post('im.close', options)
end
#
- # Fetches history of messages and events from direct message channel.
+ # This method returns a portion of messages/events from the specified direct message channel.
+ # To read the entire history for a direct message channel, call the method with no latest or
+ # oldest arguments, and then continue paging using the instructions below.
#
# @option options [im] :channel
# Direct message channel to fetch history for.
# @option options [Object] :inclusive
# Include messages with latest or oldest timestamp in results.
@@ -38,11 +40,11 @@
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
post('im.history', options)
end
#
- # Lists direct message channels for the calling user.
+ # Don't use this method. Use conversations.list instead.
#
# @option options [Object] :cursor
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
# @option options [Object] :limit
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
@@ -57,11 +59,11 @@
post('im.list', options)
end
end
#
- # Sets the read cursor in a direct message channel.
+ # This method moves the read cursor in a direct message channel.
#
# @option options [im] :channel
# Direct message channel to set reading cursor in.
# @option options [timestamp] :ts
# Timestamp of the most recently seen message.
@@ -73,11 +75,11 @@
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
post('im.mark', options)
end
#
- # Opens a direct message channel.
+ # This method opens a direct message channel with another member of your Slack team.
#
# @option options [user] :user
# User to open a direct message channel with.
# @option options [Object] :include_locale
# Set this to true to receive the locale for this im. Defaults to false.
@@ -90,10 +92,10 @@
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
post('im.open', options)
end
#
- # Retrieve a thread of messages posted to a direct message conversation
+ # This method returns an entire thread (a message plus all the messages in reply to it).
#
# @option options [im] :channel
# Direct message channel to fetch thread from.
# @option options [Object] :thread_ts
# Unique identifier of a thread's parent message.