Sha256: 70d31f7eb6bc0aa4811a1a0d18ada7b12a1d8fe52a487c3120a2fee22f17dbb9

Contents?: true

Size: 1.87 KB

Versions: 5

Compression:

Stored size: 1.87 KB

Contents

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

desc 'Stars methods.'
command 'stars' do |g|
  g.desc 'Adds a star to an item.'
  g.long_desc %( Adds a star to an item. )
  g.command 'add' do |c|
    c.flag 'channel', desc: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).'
    c.flag 'file', desc: 'File to add star to.'
    c.flag 'file_comment', desc: 'File comment to add star to.'
    c.flag 'timestamp', desc: 'Timestamp of the message to add star to.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.stars_add(options))
    end
  end

  g.desc 'Lists stars for a user.'
  g.long_desc %( Lists stars for a user. )
  g.command 'list' do |c|
    c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details."
    c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached."
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.stars_list(options))
    end
  end

  g.desc 'Removes a star from an item.'
  g.long_desc %( Removes a star from an item. )
  g.command 'remove' do |c|
    c.flag 'channel', desc: 'Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).'
    c.flag 'file', desc: 'File to remove star from.'
    c.flag 'file_comment', desc: 'File comment to remove star from.'
    c.flag 'timestamp', desc: 'Timestamp of the message to remove star from.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.stars_remove(options))
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-0.14.1 bin/commands/stars.rb
slack-ruby-client-0.14.0 bin/commands/stars.rb
slack-ruby-client-0.13.1 bin/commands/stars.rb
slack-ruby-client-0.13.0 bin/commands/stars.rb
slack-ruby-client-0.12.0 bin/commands/stars.rb