Skip to content

Commit f5a2b7d

Browse files
committed
files_upload_v2 > files_upload_external
1 parent 6c2e12e commit f5a2b7d

File tree

7 files changed

+91
-91
lines changed

7 files changed

+91
-91
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* [#527](https://github.com/slack-ruby/slack-ruby-client/pull/527): Explicitly require `racc` and `ostruct` - [@dblock](https://github.com/dblock).
55
* [#528](https://github.com/slack-ruby/slack-ruby-client/pull/528): Don't treat asterisks in list items as italic in markdown - [@rspeicher](https://github.com/rspeicher).
66
* [#530](https://github.com/slack-ruby/slack-ruby-client/pull/530): Specify dependency on logger - [@rwstauner](https://github.com/rwstauner).
7-
* [#533](https://github.com/slack-ruby/slack-ruby-client/pull/533): Added `files_upload_v2` - [@gregsaab](https://github.com/gregsaab).
7+
* [#533](https://github.com/slack-ruby/slack-ruby-client/pull/533): Added `files_upload_external` - [@gregsaab](https://github.com/gregsaab).
88
* Your contribution here.
99

1010
### 2.4.0 (2024/07/14)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ general_channel = channels.detect { |c| c.name == 'general' }
173173

174174
Upload files with [sequenced API calls](https://api.slack.com/messaging/files#uploading_files).
175175

176-
This library provides a helper method `files_upload_v2` that wraps the three separate API calls.
176+
This library provides a helper method `files_upload_external` that wraps the three separate API calls.
177177

178178
```ruby
179-
client.files_upload_v2(
179+
client.files_upload_external(
180180
# required options
181181
channels: 'C000000,C000001', # comma delimited channel ids, only one channel is required
182182
filename: 'results.pdf', # this is used for the file title, unless a :title option is provided

lib/slack/web/api/helpers/files.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module Files
2727
# Provide another message's ts value to upload this file as a reply.
2828
# Never use a reply's ts value; use its parent instead.
2929
# Also make sure to provide only one channel when using 'thread_ts'.
30-
def files_upload_v2(options = {})
30+
def files_upload_external(options = {})
3131
%i[filename content channels].each do |param|
3232
raise ArgumentError, "Required argument :#{param} missing" if options[param].nil?
3333
end

spec/fixtures/slack/web/files_upload_v2.yml renamed to spec/fixtures/slack/web/files_upload_external.yml

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/slack/web/files_upload_v2_with_all_options.yml renamed to spec/fixtures/slack/web/files_upload_external_with_all_options.yml

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)