lib/slack/web/api/endpoints/files.rb in slack-ruby-client-0.7.0 vs lib/slack/web/api/endpoints/files.rb in slack-ruby-client-0.7.1
- old
+ new
@@ -4,28 +4,10 @@
module Web
module Api
module Endpoints
module Files
#
- # Edit an existing comment on a file. Only the user who created a comment may make edits. Teams may configure a limited time window during which file comment edits are allowed.
- #
- # @option options [file] :file
- # File containing the comment to edit.
- # @option options [Object] :id
- # The comment to edit.
- # @option options [Object] :comment
- # Text of the comment to edit.
- # @see https://api.slack.com/methods/files.comments
- # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.comments.json
- def files_comments(options = {})
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
- throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
- throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
- post('files.comments', options)
- end
-
- #
# This method deletes a file from your team.
#
# @option options [file] :file
# ID of file to delete.
# @see https://api.slack.com/methods/files.delete
@@ -106,15 +88,15 @@
#
# This method allows you to create or upload an existing file.
#
# @option options [file] :file
- # File contents via multipart/form-data.
+ # File contents via multipart/form-data. If omitting this parameter, you must submit content.
# @option options [Object] :content
- # File contents via a POST var.
+ # File contents via a POST variable. If omitting this parameter, you must provide a file.
# @option options [Object] :filetype
- # Slack-internal file type identifier.
+ # A file type identifier.
# @option options [Object] :filename
# Filename of file.
# @option options [Object] :title
# Title of file.
# @option options [Object] :initial_comment
@@ -122,10 +104,9 @@
# @option options [Object] :channels
# Comma-separated list of channel names or IDs where the file will be shared.
# @see https://api.slack.com/methods/files.upload
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.upload.json
def files_upload(options = {})
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
throw ArgumentError.new('Required arguments :filename missing') if options[:filename].nil?
post('files.upload', options)
end
end
end