Sha256: f3fd876c5f7f63d386e2acbb5422827fc8dba29ba00856f1537460f86f21db9c

Contents?: true

Size: 1.93 KB

Versions: 6

Compression:

Stored size: 1.93 KB

Contents

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

desc 'Reminders methods.'
command 'reminders' do |g|
  g.desc 'Creates a reminder.'
  g.long_desc %( Creates a reminder. )
  g.command 'add' do |c|
    c.flag 'text', desc: 'The content of the reminder.'
    c.flag 'time', desc: 'When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").'
    c.flag 'user', desc: 'The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.reminders_add(options))
    end
  end

  g.desc 'Marks a reminder as complete.'
  g.long_desc %( Marks a reminder as complete. )
  g.command 'complete' do |c|
    c.flag 'reminder', desc: 'The ID of the reminder to be marked as complete.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.reminders_complete(options))
    end
  end

  g.desc 'Deletes a reminder.'
  g.long_desc %( Deletes a reminder. )
  g.command 'delete' do |c|
    c.flag 'reminder', desc: 'The ID of the reminder.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.reminders_delete(options))
    end
  end

  g.desc 'Gets information about a reminder.'
  g.long_desc %( Gets information about a reminder. )
  g.command 'info' do |c|
    c.flag 'reminder', desc: 'The ID of the reminder.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.reminders_info(options))
    end
  end

  g.desc 'Lists all reminders created by or for a given user.'
  g.long_desc %( Lists all reminders created by or for a given user. )
  g.command 'list' do |c|
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.reminders_list(options))
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
slack-ruby-client-0.17.0 bin/commands/reminders.rb
slack-ruby-client-0.16.0 bin/commands/reminders.rb
slack-ruby-client-0.15.1 bin/commands/reminders.rb
slack-ruby-client-0.15.0 bin/commands/reminders.rb
slack-ruby-client-0.14.6 bin/commands/reminders.rb
slack-ruby-client-0.14.5 bin/commands/reminders.rb