Module: Slack::Web::Api::Endpoints::Files
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/files.rb
Instance Method Summary collapse
-
#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_upload(options = {}) ⇒ Object
Uploads or creates a file.
Instance Method Details
#files_delete(options = {}) ⇒ Object
Deletes a file.
15 16 17 18 |
# File 'lib/slack/web/api/endpoints/files.rb', line 15 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.
27 28 29 30 |
# File 'lib/slack/web/api/endpoints/files.rb', line 27 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.
59 60 61 62 63 |
# File 'lib/slack/web/api/endpoints/files.rb', line 59 def files_list( = {}) = .merge(channel: channels_id()['channel']['id']) if [:channel] = .merge(user: users_id()['user']['id']) if [:user] post('files.list', ) end |
#files_revokePublicURL(options = {}) ⇒ Object
Revokes public/external sharing access for a file
72 73 74 75 |
# File 'lib/slack/web/api/endpoints/files.rb', line 72 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.
84 85 86 87 |
# File 'lib/slack/web/api/endpoints/files.rb', line 84 def files_sharedPublicURL( = {}) throw ArgumentError.new('Required arguments :file missing') if [:file].nil? post('files.sharedPublicURL', ) end |
#files_upload(options = {}) ⇒ Object
Uploads or creates a file.
108 109 110 |
# File 'lib/slack/web/api/endpoints/files.rb', line 108 def files_upload( = {}) post('files.upload', ) end |