forked from slack-ruby/slack-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reminders.rb
63 lines (58 loc) · 2.84 KB
/
reminders.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
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 'recurrence', desc: 'Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.'
c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
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.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
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.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
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.flag 'team_id', desc: 'Encoded team id, required if org token is passed.'
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.flag 'team_id', desc: 'Encoded team id, required if org token is passed.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.reminders_list(options))
end
end
end
end
end
end