Module: Slack::Endpoint::Files
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/files.rb
Instance Method Summary collapse
-
#files_delete(options = {}) ⇒ Object
This method deletes a file from your team.
-
#files_info(options = {}) ⇒ Object
This method returns information about a file in your team.
-
#files_list(options = {}) ⇒ Object
This method returns a list of files within the team.
-
#files_upload(options = {}) ⇒ Object
This method allows you to create or upload an existing file.
Instance Method Details
#files_delete(options = {}) ⇒ Object
This method deletes a file from your team.
14 15 16 17 18 |
# File 'lib/slack/endpoint/files.rb', line 14 def files_delete(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("files.delete", ) end |
#files_info(options = {}) ⇒ Object
This method returns information about a file in your team.
32 33 34 35 36 |
# File 'lib/slack/endpoint/files.rb', line 32 def files_info(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("files.info", ) end |
#files_list(options = {}) ⇒ Object
This method returns a list of files within the team. It can be filtered and sliced in various ways.
68 69 70 71 |
# File 'lib/slack/endpoint/files.rb', line 68 def files_list(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("files.list", ) end |
#files_upload(options = {}) ⇒ Object
This method allows you to create or upload an existing file.
93 94 95 96 |
# File 'lib/slack/endpoint/files.rb', line 93 def files_upload(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("files.upload", ) end |