Module: Slack::Web::Api::Endpoints::FilesRemote
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/files_remote.rb
Instance Method Summary collapse
-
#files_remote_add(options = {}) ⇒ Object
Adds a file from a remote service.
-
#files_remote_info(options = {}) ⇒ Object
Retrieve information about a remote file added to Slack.
-
#files_remote_list(options = {}) ⇒ Object
Retrieve information about a remote file added to Slack.
-
#files_remote_remove(options = {}) ⇒ Object
Remove a remote file.
-
#files_remote_share(options = {}) ⇒ Object
Share a remote file into a channel.
-
#files_remote_update(options = {}) ⇒ Object
Updates an existing remote file.
Instance Method Details
#files_remote_add(options = {}) ⇒ Object
Adds a file from a remote service
26 27 28 29 30 31 |
# File 'lib/slack/web/api/endpoints/files_remote.rb', line 26 def files_remote_add( = {}) throw ArgumentError.new('Required arguments :external_id missing') if [:external_id].nil? throw ArgumentError.new('Required arguments :external_url missing') if [:external_url].nil? throw ArgumentError.new('Required arguments :title missing') if [:title].nil? post('files.remote.add', ) end |
#files_remote_info(options = {}) ⇒ Object
Retrieve information about a remote file added to Slack
42 43 44 |
# File 'lib/slack/web/api/endpoints/files_remote.rb', line 42 def files_remote_info( = {}) post('files.remote.info', ) end |
#files_remote_list(options = {}) ⇒ Object
Retrieve information about a remote file added to Slack
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/slack/web/api/endpoints/files_remote.rb', line 61 def files_remote_list( = {}) = .merge(channel: conversations_id()['channel']['id']) if [:channel] if block_given? Pagination::Cursor.new(self, :files_remote_list, ).each do |page| yield page end else post('files.remote.list', ) end end |
#files_remote_remove(options = {}) ⇒ Object
Remove a remote file.
81 82 83 |
# File 'lib/slack/web/api/endpoints/files_remote.rb', line 81 def files_remote_remove( = {}) post('files.remote.remove', ) end |
#files_remote_share(options = {}) ⇒ Object
Share a remote file into a channel.
96 97 98 99 |
# File 'lib/slack/web/api/endpoints/files_remote.rb', line 96 def files_remote_share( = {}) throw ArgumentError.new('Required arguments :channels missing') if [:channels].nil? post('files.remote.share', ) end |
#files_remote_update(options = {}) ⇒ Object
Updates an existing remote file.
120 121 122 |
# File 'lib/slack/web/api/endpoints/files_remote.rb', line 120 def files_remote_update( = {}) post('files.remote.update', ) end |