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
A new file commenting experience arrived on July 23, 2018.
-
#files_edit(options = {}) ⇒ Object
Change the properties of a file (undocumented).
-
#files_info(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018.
-
#files_list(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018.
-
#files_revokePublicURL(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018.
-
#files_share(options = {}) ⇒ Object
Share an existing file in a channel (undocumented).
-
#files_sharedPublicURL(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018.
-
#files_upload(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018.
Instance Method Details
#files_delete(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018. Learn more about what’s new and the migration path for apps already working with files and file comments.
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_edit(options = {}) ⇒ Object
Change the properties of a file (undocumented)
30 31 32 33 34 35 |
# File 'lib/slack/web/api/endpoints/files.rb', line 30 def files_edit( = {}) throw ArgumentError.new('Required arguments :file missing') if [:file].nil? throw ArgumentError.new('Required arguments :title missing') if [:title].nil? logger.warn('The files.edit method is undocumented.') post('files.edit', ) end |
#files_info(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018. Learn more about what’s new and the migration path for apps already working with files and file comments.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/slack/web/api/endpoints/files.rb', line 48 def files_info( = {}) throw ArgumentError.new('Required arguments :file missing') if [:file].nil? if block_given? Pagination::Cursor.new(self, :files_info, ).each do |page| yield page end else post('files.info', ) end end |
#files_list(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018. Learn more about what’s new and the migration path for apps already working with files and file comments.
74 75 76 77 78 |
# File 'lib/slack/web/api/endpoints/files.rb', line 74 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
A new file commenting experience arrived on July 23, 2018. Learn more about what’s new and the migration path for apps already working with files and file comments.
87 88 89 90 |
# File 'lib/slack/web/api/endpoints/files.rb', line 87 def files_revokePublicURL( = {}) throw ArgumentError.new('Required arguments :file missing') if [:file].nil? post('files.revokePublicURL', ) end |
#files_share(options = {}) ⇒ Object
Share an existing file in a channel (undocumented)
100 101 102 103 104 105 106 |
# File 'lib/slack/web/api/endpoints/files.rb', line 100 def files_share( = {}) throw ArgumentError.new('Required arguments :file missing') if [:file].nil? throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: channels_id()['channel']['id']) if [:channel] logger.warn('The files.share method is undocumented.') post('files.share', ) end |
#files_sharedPublicURL(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018. Learn more about what’s new and the migration path for apps already working with files and file comments.
115 116 117 118 |
# File 'lib/slack/web/api/endpoints/files.rb', line 115 def files_sharedPublicURL( = {}) throw ArgumentError.new('Required arguments :file missing') if [:file].nil? post('files.sharedPublicURL', ) end |
#files_upload(options = {}) ⇒ Object
A new file commenting experience arrived on July 23, 2018. Learn more about what’s new and the migration path for apps already working with files and file comments.
141 142 143 |
# File 'lib/slack/web/api/endpoints/files.rb', line 141 def files_upload( = {}) post('files.upload', ) end |