Sha256: ac57ccb2ab5f5e823ed21e297bbfdfc923d25357387b9aac755ace072a772475

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 KB

Contents

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

desc 'Pins methods.'
command 'pins' do |g|
  g.desc 'Pins an item to a channel.'
  g.long_desc %( Pins an item to a channel. )
  g.command 'add' do |c|
    c.flag 'channel', desc: 'Channel to pin the item in.'
    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 'Lists items pinned to a channel.'
  g.long_desc %( Lists 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 'Un-pins an item from a channel.'
  g.long_desc %( Un-pins an item from a channel. )
  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

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-client-0.15.1 bin/commands/pins.rb
slack-ruby-client-0.15.0 bin/commands/pins.rb
slack-ruby-client-0.14.6 bin/commands/pins.rb
slack-ruby-client-0.14.5 bin/commands/pins.rb