Sha256: a5a55f8e3ade95341f765986e707d2594876287c935e6d1ec780045665f47034

Contents?: true

Size: 1.8 KB

Versions: 15

Compression:

Stored size: 1.8 KB

Contents

# This file was auto-generated by lib/tasks/web.rake

desc 'Pins methods.'
command 'pins' do |g|
  g.desc 'This method pins an item (file, file comment, channel message, or group message) to a particular channel.'
  g.long_desc %( This method pins an item (file, file comment, channel message, or group message) to a particular channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified. )
  g.command 'add' do |c|
    c.flag 'channel', desc: 'Channel to pin the item in.'
    c.flag 'file', desc: 'File to pin.'
    c.flag 'file_comment', desc: 'File comment to pin.'
    c.flag 'timestamp', desc: 'Timestamp of the message to pin.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.pins_add(options))
    end
  end

  g.desc 'This method lists the items pinned to a channel.'
  g.long_desc %( This method lists the items pinned to a channel. )
  g.command 'list' do |c|
    c.flag 'channel', desc: 'Channel to get pinned items for.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.pins_list(options))
    end
  end

  g.desc 'This method un-pins an item (file, file comment, channel message, or group message) from a channel.'
  g.long_desc %( This method un-pins an item (file, file comment, channel message, or group message) from a channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified. )
  g.command 'remove' do |c|
    c.flag 'channel', desc: 'Channel where the item is pinned to.'
    c.flag 'file', desc: 'File to un-pin.'
    c.flag 'file_comment', desc: 'File comment to un-pin.'
    c.flag 'timestamp', desc: 'Timestamp of the message to un-pin.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.pins_remove(options))
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
slack-ruby-client-0.14.2 bin/commands/pins.rb
slack-ruby-client-0.9.0 bin/commands/pins.rb
slack-ruby-client-0.8.1 bin/commands/pins.rb
slack-ruby-client-0.8.0 bin/commands/pins.rb
slack-ruby-client-0.7.9 bin/commands/pins.rb
slack-ruby-client-0.7.8 bin/commands/pins.rb
slack-ruby-client-0.7.7 bin/commands/pins.rb
slack-ruby-client-0.7.6 bin/commands/pins.rb
slack-ruby-client-0.7.5 bin/commands/pins.rb
slack-ruby-client-0.7.4 bin/commands/pins.rb
slack-ruby-client-0.7.3 bin/commands/pins.rb
slack-ruby-client-0.7.2 bin/commands/pins.rb
slack-ruby-client-0.7.1 bin/commands/pins.rb
slack-ruby-client-0.7.0 bin/commands/pins.rb
slack-ruby-client-0.6.0 bin/commands/pins.rb