lib/slack/web/api/endpoints/files_remote.rb in slack-ruby-client-1.1.0 vs lib/slack/web/api/endpoints/files_remote.rb in slack-ruby-client-2.0.0

- old
+ new

@@ -15,20 +15,20 @@ # URL of the remote file. # @option options [string] :title # Title of the file being shared. # @option options [string] :filetype # type of file. - # @option options [string] :indexable_file_contents + # @option options [Object] :indexable_file_contents # A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file. - # @option options [string] :preview_image + # @option options [Object] :preview_image # Preview of the document via multipart/form-data. # @see https://api.slack.com/methods/files.remote.add # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.add.json def files_remote_add(options = {}) - throw ArgumentError.new('Required arguments :external_id missing') if options[:external_id].nil? - throw ArgumentError.new('Required arguments :external_url missing') if options[:external_url].nil? - throw ArgumentError.new('Required arguments :title missing') if options[:title].nil? + raise ArgumentError, 'Required arguments :external_id missing' if options[:external_id].nil? + raise ArgumentError, 'Required arguments :external_url missing' if options[:external_url].nil? + raise ArgumentError, 'Required arguments :title missing' if options[:title].nil? post('files.remote.add', options) end # # Retrieve information about a remote file added to Slack @@ -92,11 +92,11 @@ # @option options [file] :file # Specify a file registered with Slack by providing its ID. Either this field or external_id or both are required. # @see https://api.slack.com/methods/files.remote.share # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.share.json def files_remote_share(options = {}) - throw ArgumentError.new('Required arguments :channels missing') if options[:channels].nil? + raise ArgumentError, 'Required arguments :channels missing' if options[:channels].nil? post('files.remote.share', options) end # # Updates an existing remote file. @@ -107,12 +107,12 @@ # URL of the remote file. # @option options [file] :file # Specify a file by providing its ID. # @option options [string] :filetype # type of file. - # @option options [string] :indexable_file_contents + # @option options [Object] :indexable_file_contents # File containing contents that can be used to improve searchability for the remote file. - # @option options [string] :preview_image + # @option options [Object] :preview_image # Preview of the document via multipart/form-data. # @option options [string] :title # Title of the file being shared. # @see https://api.slack.com/methods/files.remote.update # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.update.json