module Slack::Web::Api::Endpoints::FilesRemote
Public Instance Methods
Adds a file from a remote service
@option options [Object] :external_id
Creator defined GUID for the file.
@option options [Object] :external_url
URL of the remote file.
@option options [Object] :title
Title of the file being shared.
@option options [Object] :filetype
type of file.
@option options [Object] :indexable_file_contents
A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
@option options [Object] :preview_image
Preview of the document via multipart/form-data.
@see api.slack.com/methods/files.remote.add @see github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.add.json
# File lib/slack/web/api/endpoints/files_remote.rb, line 26 def files_remote_add(options = {}) throw ArgumentError.new('Required arguments :external_id missing') if options[:external_id].nil? throw ArgumentError.new('Required arguments :external_url missing') if options[:external_url].nil? throw ArgumentError.new('Required arguments :title missing') if options[:title].nil? post('files.remote.add', options) end
Retrieve information about a remote file added to Slack
@option options [Object] :external_id
Creator defined GUID for the file.
@option options [file] :file
Specify a file by providing its ID.
@see api.slack.com/methods/files.remote.info @see github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.info.json
# File lib/slack/web/api/endpoints/files_remote.rb, line 42 def files_remote_info(options = {}) post('files.remote.info', options) end
Retrieve information about a remote file added to Slack
@option options [channel] :channel
Filter files appearing in a specific channel, indicated by its ID.
@option options [Object] :cursor
Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
@option options [Object] :limit
The maximum number of items to return.
@option options [Object] :ts_from
Filter files created after this timestamp (inclusive).
@option options [Object] :ts_to
Filter files created before this timestamp (inclusive).
@see api.slack.com/methods/files.remote.list @see github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.list.json
# File lib/slack/web/api/endpoints/files_remote.rb, line 61 def files_remote_list(options = {}) options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel] if block_given? Pagination::Cursor.new(self, :files_remote_list, options).each do |page| yield page end else post('files.remote.list', options) end end
Remove a remote file.
@option options [Object] :external_id
Creator defined GUID for the file.
@option options [file] :file
Specify a file by providing its ID.
@see api.slack.com/methods/files.remote.remove @see github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.remove.json
# File lib/slack/web/api/endpoints/files_remote.rb, line 81 def files_remote_remove(options = {}) post('files.remote.remove', options) end
Updates an existing remote file.
@option options [Object] :external_id
Creator defined GUID for the file.
@option options [Object] :external_url
URL of the remote file.
@option options [file] :file
Specify a file by providing its ID.
@option options [Object] :filetype
type of file.
@option options [Object] :indexable_file_contents
File containing contents that can be used to improve searchability for the remote file.
@option options [Object] :preview_image
Preview of the document via multipart/form-data.
@option options [Object] :title
Title of the file being shared.
@see api.slack.com/methods/files.remote.update @see github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.update.json
# File lib/slack/web/api/endpoints/files_remote.rb, line 120 def files_remote_update(options = {}) post('files.remote.update', options) end