Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: slack-ruby/slack-ruby-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.0
Choose a base ref
...
head repository: slack-ruby/slack-ruby-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.11.0
Choose a head ref
  • 13 commits
  • 107 files changed
  • 5 contributors

Commits on Sep 20, 2017

  1. Copy the full SHA
    0d73284 View commit details

Commits on Sep 30, 2017

  1. Update for dialogs (#173)

    * initial commit of generated dialog.rb before running git diff to produce patch
    
    * adding Dialog support
    
    * removing the auto-generated dialog spec
    alexagranov authored and dblock committed Sep 30, 2017
    Copy the full SHA
    1aaf5d4 View commit details

Commits on Oct 30, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    webknjaz 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
    Copy the full SHA
    60c32b3 View commit details
  2. Merge pull request #176 from seuros/master

    Remove json gem from dependencies
    dblock authored Oct 30, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    webknjaz 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
    Copy the full SHA
    3691d40 View commit details

Commits on Nov 6, 2017

  1. fix api ref repo

    manuelmeurer committed Nov 6, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    webknjaz 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
    Copy the full SHA
    1c366e3 View commit details
  2. Merge pull request #177 from krautcomputing/fix_api_ref_repo

    fix api ref repo
    dblock authored Nov 6, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    webknjaz 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
    Copy the full SHA
    9e6ea96 View commit details

Commits on Nov 25, 2017

  1. Upgraded to RuboCop 0.51.0.

    dblock committed Nov 25, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    webknjaz 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
    Copy the full SHA
    43fd6ea View commit details
  2. Merge pull request #180 from dblock/rubocop-0.51.0

    Upgraded to RuboCop 0.51.0.
    dblock authored Nov 25, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    webknjaz 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
    Copy the full SHA
    35ce398 View commit details
  3. Copy the full SHA
    feb764e View commit details
  4. Merge pull request #181 from dblock/update-slack-api-ref

    Update slack api ref
    dblock authored Nov 25, 2017
    Copy the full SHA
    0c3aca2 View commit details
  5. Added undocumented methods.

    dblock committed Nov 25, 2017
    Copy the full SHA
    a22363a View commit details
  6. Merge pull request #182 from dblock/add-undocumented-methods

    Add undocumented methods
    dblock authored Nov 25, 2017
    Copy the full SHA
    8264762 View commit details
  7. Preparing for release, 0.11.0.

    dblock committed Nov 25, 2017
    Copy the full SHA
    429d0b9 View commit details
Showing with 994 additions and 534 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 .rubocop.yml
  3. +30 −34 .rubocop_todo.yml
  4. +0 −1 .travis.yml
  5. +9 −0 CHANGELOG.md
  6. +2 −2 CONTRIBUTING.md
  7. +3 −1 Gemfile
  8. +1 −1 README.md
  9. +1 −1 Rakefile
  10. +5 −1 bin/commands.rb
  11. +18 −9 bin/commands/channels.rb
  12. +24 −3 bin/commands/chat.rb
  13. +14 −0 bin/commands/dialog.rb
  14. +21 −0 bin/commands/files.rb
  15. +10 −10 bin/commands/groups.rb
  16. +14 −0 bin/commands/migration.rb
  17. +2 −4 bin/commands/rtm.rb
  18. +18 −18 bin/commands/users.rb
  19. +28 −0 bin/commands/users_admin.rb
  20. +12 −0 bin/commands/users_prefs.rb
  21. +1 −1 bin/slack
  22. +1 −1 examples/hi_real_time/hi.rb
  23. +1 −1 examples/hi_real_time_and_web/hi.rb
  24. +1 −1 examples/hi_real_time_async_celluloid/hi.rb
  25. +1 −1 examples/hi_real_time_async_eventmachine/hi.rb
  26. +1 −1 examples/hi_web/hi.rb
  27. +1 −1 examples/new_ticket/new_ticket.rb
  28. +4 −4 lib/slack/messages/formatting.rb
  29. +1 −2 lib/slack/messages/message.rb
  30. +1 −1 lib/slack/real_time/api/templates/event_handler.erb
  31. +10 −9 lib/slack/real_time/client.rb
  32. +5 −1 lib/slack/real_time/concurrency/celluloid.rb
  33. +11 −11 lib/slack/real_time/config.rb
  34. +1 −2 lib/slack/real_time/models/base.rb
  35. +2 −2 lib/slack/real_time/socket.rb
  36. +1 −2 lib/slack/real_time/stores/base.rb
  37. +76 −76 lib/slack/real_time/stores/starter.rb
  38. +104 −94 lib/slack/real_time/stores/store.rb
  39. +1 −1 lib/slack/version.rb
  40. +10 −2 lib/slack/web/api/endpoints.rb
  41. +1 −1 lib/slack/web/api/endpoints/api.rb
  42. +2 −2 lib/slack/web/api/endpoints/apps_permissions.rb
  43. +2 −2 lib/slack/web/api/endpoints/auth.rb
  44. +1 −1 lib/slack/web/api/endpoints/bots.rb
  45. +27 −15 lib/slack/web/api/endpoints/channels.rb
  46. +42 −9 lib/slack/web/api/endpoints/chat.rb
  47. +17 −17 lib/slack/web/api/endpoints/conversations.rb
  48. +32 −0 lib/slack/web/api/endpoints/dialog.rb
  49. +5 −5 lib/slack/web/api/endpoints/dnd.rb
  50. +1 −1 lib/slack/web/api/endpoints/emoji.rb
  51. +37 −6 lib/slack/web/api/endpoints/files.rb
  52. +3 −3 lib/slack/web/api/endpoints/files_comments.rb
  53. +17 −17 lib/slack/web/api/endpoints/groups.rb
  54. +6 −6 lib/slack/web/api/endpoints/im.rb
  55. +25 −0 lib/slack/web/api/endpoints/migration.rb
  56. +6 −6 lib/slack/web/api/endpoints/mpim.rb
  57. +2 −2 lib/slack/web/api/endpoints/oauth.rb
  58. +3 −3 lib/slack/web/api/endpoints/pins.rb
  59. +1 −1 lib/slack/web/api/endpoints/presence.rb
  60. +4 −4 lib/slack/web/api/endpoints/reactions.rb
  61. +5 −5 lib/slack/web/api/endpoints/reminders.rb
  62. +3 −7 lib/slack/web/api/endpoints/rtm.rb
  63. +3 −3 lib/slack/web/api/endpoints/search.rb
  64. +3 −3 lib/slack/web/api/endpoints/stars.rb
  65. +4 −4 lib/slack/web/api/endpoints/team.rb
  66. +1 −1 lib/slack/web/api/endpoints/team_profile.rb
  67. +5 −5 lib/slack/web/api/endpoints/usergroups.rb
  68. +2 −2 lib/slack/web/api/endpoints/usergroups_users.rb
  69. +8 −8 lib/slack/web/api/endpoints/users.rb
  70. +46 −0 lib/slack/web/api/endpoints/users_admin.rb
  71. +19 −0 lib/slack/web/api/endpoints/users_prefs.rb
  72. +2 −2 lib/slack/web/api/endpoints/users_profile.rb
  73. +1 −1 lib/slack/web/api/mixins/ids.id.rb
  74. +38 −36 lib/slack/web/api/mixins/users.search.rb
  75. +1 −1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
  76. +1 −1 lib/slack/web/api/patches/chat.3.update-attachments-support.patch
  77. +17 −0 lib/slack/web/api/patches/dialog.1.open-json-support.patch
  78. +1 −1 lib/slack/web/api/slack-api-ref
  79. +2 −1 lib/slack/web/api/templates/command.erb
  80. +1 −1 lib/slack/web/api/templates/commands.erb
  81. +2 −2 lib/slack/web/api/templates/endpoints.erb
  82. +8 −3 lib/slack/web/api/templates/method.erb
  83. +1 −1 lib/slack/web/api/templates/method_spec.erb
  84. +12 −12 lib/slack/web/config.rb
  85. +3 −3 lib/slack/web/faraday/response/raise_error.rb
  86. +1 −1 lib/tasks/git.rake
  87. +1 −1 lib/tasks/real_time.rake
  88. +4 −1 lib/tasks/web.rake
  89. +2 −3 slack-ruby-client.gemspec
  90. +1 −1 spec/slack/messages/formatting_spec.rb
  91. +3 −2 spec/slack/real_time/client_spec.rb
  92. +1 −1 spec/slack/real_time/concurrency/celluloid_spec.rb
  93. +1 −1 spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
  94. +4 −2 spec/slack/real_time/event_handlers/bot_spec.rb
  95. +1 −1 spec/slack/real_time/event_handlers/event_handlers_spec.rb
  96. +4 −2 spec/slack/real_time/event_handlers/user_spec.rb
  97. +28 −0 spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb
  98. +8 −6 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
  99. +16 −0 spec/slack/web/api/endpoints/files_spec.rb
  100. +12 −0 spec/slack/web/api/endpoints/migration_spec.rb
  101. +17 −0 spec/slack/web/api/endpoints/users_admin_spec.rb
  102. +7 −0 spec/slack/web/api/endpoints/users_prefs_spec.rb
  103. +1 −1 spec/slack/web/api/error_spec.rb
  104. +1 −1 spec/slack/web/api/errors/slack_error_spec.rb
  105. +6 −4 spec/slack/web/api/mixins/users_spec.rb
  106. +1 −1 spec/support/queue_with_timeout.rb
  107. +1 −2 spec/support/real_time/concurrency/mock.rb
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,4 @@ pkg
Gemfile.lock
.DS_Store
.bundle
.idea
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -3,4 +3,7 @@ AllCops:
- vendor/**/*
- lib/slack/web/api/slack-api-ref/**/*

Naming/MethodName:
Enabled: false

inherit_from: .rubocop_todo.yml
64 changes: 30 additions & 34 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-09-19 15:04:24 -0400 using RuboCop version 0.35.0.
# on 2017-11-25 11:28:32 -0500 using RuboCop version 0.51.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -14,34 +14,38 @@ Lint/HandleExceptions:
- 'spec/slack/real_time/concurrency/eventmachine_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks.
Lint/UnusedBlockArgument:
Lint/RescueWithoutErrorClass:
Exclude:
- 'lib/slack/messages/formatting.rb'
- 'lib/slack/real_time/concurrency/celluloid.rb'

# Offense count: 18
Metrics/AbcSize:
Max: 44

# Offense count: 81
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 421

# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 165
Max: 166

# Offense count: 4
Metrics/CyclomaticComplexity:
Max: 9

# Offense count: 734
# Configuration parameters: AllowURI, URISchemes.
# Offense count: 741
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 266

# Offense count: 9
# Offense count: 10
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 32
Max: 42

# Offense count: 1
# Configuration parameters: CountComments.
@@ -52,28 +56,32 @@ Metrics/ModuleLength:
Metrics/PerceivedComplexity:
Max: 11

# Offense count: 64
# Configuration parameters: Exclude.
Style/Documentation:
Enabled: false

# Offense count: 1
# Configuration parameters: Exclude.
Style/FileName:
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
- 'lib/slack-ruby-client.rb'

# Offense count: 136
# Offense count: 63
Style/Documentation:
Enabled: false

# Offense count: 137
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Enabled: false

# Offense count: 24
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/MethodName:
Enabled: false
# Offense count: 2
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/slack/real_time/stores/store.rb'
- 'lib/slack/web/faraday/response/raise_error.rb'

# Offense count: 3
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: module_function, extend_self
Style/ModuleFunction:
Exclude:
- 'lib/slack/config.rb'
@@ -84,15 +92,3 @@ Style/ModuleFunction:
Style/MultilineTernaryOperator:
Exclude:
- 'spec/support/real_time/connected_client.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/RescueModifier:
Exclude:
- 'lib/slack/real_time/concurrency/celluloid.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/SpecialGlobalVars:
Exclude:
- 'lib/slack/messages/formatting.rb'
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ cache: bundler
rvm:
- 2.2
- 2.1
- 2.0
- 2.3.4
- ruby-head
- jruby-head
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
### 0.11.0 (11/25/2017)

* [#173](https://github.com/slack-ruby/slack-ruby-client/issues/173): Added dialog support - [@alexagranov](https://github.com/alexagranov).
* [#176](https://github.com/slack-ruby/slack-ruby-client/issues/176): Drop dependency on `json` gem - [@seuros](https://github.com/seuros).
* [#177](https://github.com/slack-ruby/slack-ruby-client/pull/177): Fix api ref repo - [@manuelmeurer](https://github.com/manuelmeurer).
* [#180](https://github.com/slack-ruby/slack-ruby-client/pull/180): Upgraded RuboCop 0.51.0 - [@dblock](https://github.com/dblock).
* [#181](https://github.com/slack-ruby/slack-ruby-client/pull/181): Added `chat_getPermalink`, `migration_exchange` - [@dblock](https://github.com/dblock).
* [#182](https://github.com/slack-ruby/slack-ruby-client/pull/182): Added undocumented methods support with `channels_delete`, `chat_command`, `files_edit`, `files_share`, `users_admin_invite`, `users_admin_setInactive` and `users_prefs_get` - [@dblock](https://github.com/dblock).

### 0.10.0 (9/19/2017)

* [#169](https://github.com/slack-ruby/slack-ruby-client/pull/169): Added [Conversations API](https://api.slack.com/docs/conversations-api) - [@jmanian](https://github.com/jmanian).
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ Make sure that `bundle exec rake` completes without errors.

### Update Slack Web API

Slack Web API is updated from https://github.com/dblock/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task.
Slack Web API is updated from https://github.com/slack-ruby/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task.

```
rake slack:api:update
@@ -78,7 +78,7 @@ Sometimes it's necessary to patch auto-generated Slack Web API methods. For exam
Make a change to a generated file, for example `lib/slack/web/api/endpoints/chat.rb` and generate a patch.

```
git diff HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.1.patch
git diff --no-color HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.1.patch
```

Run `rake slack:api:update` to ensure that the patch is cleanly applied. Implement a test for the added or modified functionality and commit the patch file.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -3,8 +3,10 @@ source 'http://rubygems.org'
gemspec

gem ENV['CONCURRENCY'], require: false if ENV.key?('CONCURRENCY')
gem 'picky' unless RUBY_PLATFORM == 'java'
# rubocop:enable Bundler/OrderedGems

gem 'activesupport', '~> 4.0'
gem 'picky' unless RUBY_PLATFORM == 'java'

group :test do
gem 'slack-ruby-danger', '~> 0.1.0', require: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web) and [RealTime Messa

## Stable Release

You're reading the documentation for the **stable** release of slack-ruby-client, 0.10.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
You're reading the documentation for the **stable** release of slack-ruby-client, 0.11.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.

## Installation

2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ end
require 'rubocop/rake_task'
RuboCop::RakeTask.new

task default: [:rubocop, :spec]
task default: %i[rubocop spec]

load 'tasks/git.rake'
load 'tasks/web.rake'
6 changes: 5 additions & 1 deletion bin/commands.rb
Original file line number Diff line number Diff line change
@@ -7,12 +7,14 @@
require 'commands/channels'
require 'commands/chat'
require 'commands/conversations'
require 'commands/dialog'
require 'commands/dnd'
require 'commands/emoji'
require 'commands/files_comments'
require 'commands/files'
require 'commands/files_comments'
require 'commands/groups'
require 'commands/im'
require 'commands/migration'
require 'commands/mpim'
require 'commands/oauth'
require 'commands/pins'
@@ -26,4 +28,6 @@
require 'commands/usergroups'
require 'commands/usergroups_users'
require 'commands/users'
require 'commands/users_admin'
require 'commands/users_prefs'
require 'commands/users_profile'
27 changes: 18 additions & 9 deletions bin/commands/channels.rb
Original file line number Diff line number Diff line change
@@ -21,6 +21,15 @@
end
end

g.desc 'Delete a channel (undocumented)'
g.long_desc %( Delete a channel )
g.command 'delete' do |c|
c.flag 'channel', desc: 'Channel to delete.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.channels_delete(options))
end
end

g.desc 'Fetches history of messages and events from a channel.'
g.long_desc %( Fetches history of messages and events from a channel. )
g.command 'history' do |c|
@@ -34,6 +43,15 @@
end
end

g.desc 'This method returns the ID of a team channel.'
g.long_desc %( This method returns the ID of a team channel. )
g.command 'id' do |c|
c.flag 'channel', desc: 'Channel to get ID for, prefixed with #.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.channels_id(options))
end
end

g.desc 'Gets information about a channel.'
g.long_desc %( Gets information about a channel. )
g.command 'info' do |c|
@@ -154,13 +172,4 @@
puts JSON.dump($client.channels_unarchive(options))
end
end

g.desc 'This method returns the ID of a team channel.'
g.long_desc %( This method returns the ID of a team channel. )
g.command 'id' do |c|
c.flag 'channel', desc: 'Channel to get ID for, prefixed with #.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.channels_id(options))
end
end
end
27 changes: 24 additions & 3 deletions bin/commands/chat.rb
Original file line number Diff line number Diff line change
@@ -2,17 +2,38 @@

desc 'Post chat messages to Slack.'
command 'chat' do |g|
g.desc 'Execute a slash command in a public channel (undocumented)'
g.long_desc %( Execute a slash command in a public channel )
g.command 'command' do |c|
c.flag 'channel', desc: 'Channel to execute the command in.'
c.flag 'command', desc: 'Slash command to be executed. Leading backslash is required.'
c.flag 'text', desc: 'Additional parameters provided to the slash command.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.chat_command(options))
end
end

g.desc 'Deletes a message.'
g.long_desc %( Deletes a message. )
g.command 'delete' do |c|
c.flag 'channel', desc: 'Channel containing the message to be deleted.'
c.flag 'ts', desc: 'Timestamp of the message to be deleted.'
c.flag 'as_user', desc: 'Pass true to delete the message as the authed user. Bot users in this context are considered authed users.'
c.flag 'as_user', desc: 'Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.chat_delete(options))
end
end

g.desc 'Retrieve a permalink URL for a specific extant message'
g.long_desc %( Retrieve a permalink URL for a specific extant message )
g.command 'getPermalink' do |c|
c.flag 'channel', desc: 'The ID of the conversation or channel containing the message.'
c.flag 'message_ts', desc: "A message's ts value, uniquely identifying it within a channel."
c.action do |_global_options, options, _args|
puts JSON.dump($client.chat_getPermalink(options))
end
end

g.desc 'Share a me message into a channel.'
g.long_desc %( Share a me message into a channel. )
g.command 'meMessage' do |c|
@@ -77,10 +98,10 @@
g.long_desc %( Updates a message. )
g.command 'update' do |c|
c.flag 'channel', desc: 'Channel containing the message to be updated.'
c.flag 'text', desc: 'New text for the message, using the default formatting rules.'
c.flag 'text', desc: "New text for the message, using the default formatting rules. It's not required when presenting attachments."
c.flag 'ts', desc: 'Timestamp of the message to be updated.'
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text.'
c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none. This parameter should be used in conjunction with parse. To set link_names to 1, specify a parse mode of full.'
c.flag 'parse', desc: 'Change how messages are treated. Defaults to client, unlike chat.postMessage. See below.'
c.action do |_global_options, options, _args|
14 changes: 14 additions & 0 deletions bin/commands/dialog.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file was auto-generated by lib/tasks/web.rake

desc 'Dialog methods.'
command 'dialog' do |g|
g.desc 'Open a dialog with a user'
g.long_desc %( Open a dialog with a user )
g.command 'open' do |c|
c.flag 'dialog', desc: 'The dialog definition. This must be a JSON-encoded string.'
c.flag 'trigger_id', desc: 'Exchange a trigger to post to the user.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.dialog_open(options))
end
end
end
21 changes: 21 additions & 0 deletions bin/commands/files.rb
Original file line number Diff line number Diff line change
@@ -11,6 +11,17 @@
end
end

g.desc 'Change the properties of a file (undocumented)'
g.long_desc %( Change the properties of a file )
g.command 'edit' do |c|
c.flag 'file', desc: 'ID of the file to be edited'
c.flag 'title', desc: 'New title of the file'
c.flag 'filetype', desc: 'New filetype of the file. See https://api.slack.com/types/file#file_types for a list of all supported types.'
c.action do |_global_options, options, _args|
puts JSON.dump($client.files_edit(options))
end
end

g.desc 'Gets information about a team file.'
g.long_desc %( Gets information about a team file. )
g.command 'info' do |c|
@@ -54,6 +65,16 @@
end
end

g.desc 'Share an existing file in a channel (undocumented)'
g.long_desc %( Share an existing file in a channel )
g.command 'share' do |c|
c.flag 'file', desc: 'ID of the file to be shared'
c.flag 'channel', desc: 'Channel to share the file in. Works with both public (channel ID) and private channels (group ID).'
c.action do |_global_options, options, _args|
puts JSON.dump($client.files_share(options))
end
end

g.desc 'Enables a file for public/external sharing.'
g.long_desc %( Enables a file for public/external sharing. )
g.command 'sharedPublicURL' do |c|
Loading