Module: Slack::Endpoint::Files
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/files.rb
Instance Method Summary collapse
-
#files_comments_add(options = {}) ⇒ Object
Add a comment to an existing file.
-
#files_comments_delete(options = {}) ⇒ Object
Deletes an existing comment on a file.
-
#files_comments_edit(options = {}) ⇒ Object
Edit an existing file comment.
-
#files_delete(options = {}) ⇒ Object
Deletes a file.
-
#files_info(options = {}) ⇒ Object
Gets information about a team file.
-
#files_list(options = {}) ⇒ Object
Lists & filters team files.
-
#files_revokePublicURL(options = {}) ⇒ Object
Revokes public/external sharing access for a file.
-
#files_sharedPublicURL(options = {}) ⇒ Object
Enables a file for public/external sharing.
-
#files_startPartialUpload(options = {}) ⇒ Object
This is for starting the upload process of a file.
-
#files_upload(options = {}) ⇒ Object
Uploads or creates a file.
Instance Method Details
#files_comments_add(options = {}) ⇒ Object
Add a comment to an existing file.
16 17 18 19 20 |
# File 'lib/slack/endpoint/files.rb', line 16 def files_comments_add(={}) throw ArgumentError.new("Required arguments :comment missing") if [:comment].nil? throw ArgumentError.new("Required arguments :file missing") if [:file].nil? post("files.comments.add", ) end |
#files_comments_delete(options = {}) ⇒ Object
Deletes an existing comment on a file.
32 33 34 35 36 |
# File 'lib/slack/endpoint/files.rb', line 32 def files_comments_delete(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? throw ArgumentError.new("Required arguments :id missing") if [:id].nil? post("files.comments.delete", ) end |
#files_comments_edit(options = {}) ⇒ Object
Edit an existing file comment.
50 51 52 53 54 55 |
# File 'lib/slack/endpoint/files.rb', line 50 def files_comments_edit(={}) throw ArgumentError.new("Required arguments :comment missing") if [:comment].nil? throw ArgumentError.new("Required arguments :file missing") if [:file].nil? throw ArgumentError.new("Required arguments :id missing") if [:id].nil? post("files.comments.edit", ) end |
#files_delete(options = {}) ⇒ Object
Deletes a file.
65 66 67 68 |
# File 'lib/slack/endpoint/files.rb', line 65 def files_delete(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? post("files.delete", ) end |
#files_info(options = {}) ⇒ Object
Gets information about a team file.
82 83 84 85 |
# File 'lib/slack/endpoint/files.rb', line 82 def files_info(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? post("files.info", ) end |
#files_list(options = {}) ⇒ Object
Lists & filters team files.
119 120 121 |
# File 'lib/slack/endpoint/files.rb', line 119 def files_list(={}) post("files.list", ) end |
#files_revokePublicURL(options = {}) ⇒ Object
Revokes public/external sharing access for a file
131 132 133 134 |
# File 'lib/slack/endpoint/files.rb', line 131 def files_revokePublicURL(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? post("files.revokePublicURL", ) end |
#files_sharedPublicURL(options = {}) ⇒ Object
Enables a file for public/external sharing.
144 145 146 147 |
# File 'lib/slack/endpoint/files.rb', line 144 def files_sharedPublicURL(={}) throw ArgumentError.new("Required arguments :file missing") if [:file].nil? post("files.sharedPublicURL", ) end |
#files_startPartialUpload(options = {}) ⇒ Object
This is for starting the upload process of a file. It only requires a filename, and gives back a ticket ID so that later, the upload can be found and updated with all the remaining file info.
158 159 160 |
# File 'lib/slack/endpoint/files.rb', line 158 def files_startPartialUpload(={}) post("files.startPartialUpload", ) end |
#files_upload(options = {}) ⇒ Object
Uploads or creates a file.
182 183 184 |
# File 'lib/slack/endpoint/files.rb', line 182 def files_upload(={}) post("files.upload", ) end |