Sha256: 062844d7f3e2c07ac2892233b044b39e314753b646528fba14c41e0127b81d1a

Contents?: true

Size: 1.82 KB

Versions: 4

Compression:

Stored size: 1.82 KB

Contents

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

desc 'Dnd methods.'
command 'dnd' do |g|
  g.desc "Ends the current user's Do Not Disturb session immediately."
  g.long_desc %( Ends the current user's Do Not Disturb session immediately. )
  g.command 'endDnd' do |c|
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_endDnd(options))
    end
  end

  g.desc "Ends the current user's snooze mode immediately."
  g.long_desc %( Ends the current user's snooze mode immediately. )
  g.command 'endSnooze' do |c|
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_endSnooze(options))
    end
  end

  g.desc "Retrieves a user's current Do Not Disturb status."
  g.long_desc %( Retrieves a user's current Do Not Disturb status. )
  g.command 'info' do |c|
    c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_info(options))
    end
  end

  g.desc 'Turns on Do Not Disturb mode for the current user, or changes its duration.'
  g.long_desc %( Turns on Do Not Disturb mode for the current user, or changes its duration. )
  g.command 'setSnooze' do |c|
    c.flag 'num_minutes', desc: 'Number of minutes, from now, to snooze until.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_setSnooze(options))
    end
  end

  g.desc 'Retrieves the Do Not Disturb status for up to 50 users on a team.'
  g.long_desc %( Retrieves the Do Not Disturb status for up to 50 users on a team. )
  g.command 'teamInfo' do |c|
    c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_teamInfo(options))
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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