lib/slack/web/api/endpoints/files.rb in slack-ruby-client-0.5.4 vs lib/slack/web/api/endpoints/files.rb in slack-ruby-client-0.6.0

- old
+ new

@@ -1,6 +1,6 @@ -# This file was auto-generated by lib/slack/web/api/tasks/generate.rake +# This file was auto-generated by lib/tasks/web.rake module Slack module Web module Api module Endpoints @@ -50,10 +50,12 @@ # # This method returns a list of files within the team. It can be filtered and sliced in various ways. # # @option options [user] :user # Filter files created by a single user. + # @option options [channel] :channel + # Filter files appearing in a specific channel, indicated by its ID. # @option options [Object] :ts_from # Filter files created after this timestamp (inclusive). # @option options [Object] :ts_to # Filter files created before this timestamp (inclusive). # @option options [Object] :types @@ -71,9 +73,10 @@ # You can pass multiple values in the types argument, like types=posts,snippets.The default value is all, which does not filter the list. # . # @see https://api.slack.com/methods/files.list # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.list.json def files_list(options = {}) + options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('files.list', options) end #