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
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_revokePublicURL(options = {}) ⇒ Object
This method disables public/external sharing for a file.
-
#files_sharedPublicURL(options = {}) ⇒ Object
This method enables public/external sharing for a file.
-
#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.
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
This method returns information about a file in your team.
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
This method returns a list of files within the team. It can be filtered and sliced in various ways.
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
This method disables public/external sharing 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
This method enables public/external sharing for a file.
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
This method allows you to create or upload an existing file.
108 109 110 111 |
# File 'lib/slack/web/api/endpoints/files.rb', line 108 def files_upload( = {}) throw ArgumentError.new('Required arguments :filename missing') if [:filename].nil? post('files.upload', ) end |