Module: Slack::Web::Api::Endpoints::FilesComments

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/files_comments.rb

Instance Method Summary collapse

Instance Method Details

#files_comments_add(options = {}) ⇒ Object

Add a comment to an existing file.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :comment (Object)

    Text of the comment to add.

  • :file (file)

    File to add a comment to.

See Also:



17
18
19
20
21
# File 'lib/slack/web/api/endpoints/files_comments.rb', line 17

def files_comments_add(options = {})
  throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
  post('files.comments.add', options)
end

#files_comments_delete(options = {}) ⇒ Object

Deletes an existing comment on a file.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :file (file)

    File to delete a comment from.

  • :id (Object)

    The comment to delete.

See Also:



32
33
34
35
36
# File 'lib/slack/web/api/endpoints/files_comments.rb', line 32

def files_comments_delete(options = {})
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
  throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
  post('files.comments.delete', options)
end

#files_comments_edit(options = {}) ⇒ Object

Edit an existing file comment.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :comment (Object)

    Text of the comment to edit.

  • :file (file)

    File containing the comment to edit.

  • :id (Object)

    The comment to edit.

See Also:



49
50
51
52
53
54
# File 'lib/slack/web/api/endpoints/files_comments.rb', line 49

def files_comments_edit(options = {})
  throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
  throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
  throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
  post('files.comments.edit', options)
end