Module: Slack::Web::Api::Endpoints::Reminders
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/reminders.rb
Instance Method Summary collapse
-
#reminders_add(options = {}) ⇒ Object
Creates a reminder.
-
#reminders_complete(options = {}) ⇒ Object
Marks a reminder as complete.
-
#reminders_delete(options = {}) ⇒ Object
Deletes a reminder.
-
#reminders_info(options = {}) ⇒ Object
Gets information about a reminder.
-
#reminders_list(options = {}) ⇒ Object
Lists all reminders created by or for a given user.
Instance Method Details
#reminders_add(options = {}) ⇒ Object
Creates a reminder.
20 21 22 23 24 25 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 20 def reminders_add( = {}) throw ArgumentError.new('Required arguments :text missing') if [:text].nil? throw ArgumentError.new('Required arguments :time missing') if [:time].nil? = .merge(user: users_id()['user']['id']) if [:user] post('reminders.add', ) end |
#reminders_complete(options = {}) ⇒ Object
Marks a reminder as complete.
34 35 36 37 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 34 def reminders_complete( = {}) throw ArgumentError.new('Required arguments :reminder missing') if [:reminder].nil? post('reminders.complete', ) end |
#reminders_delete(options = {}) ⇒ Object
Deletes a reminder.
46 47 48 49 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 46 def reminders_delete( = {}) throw ArgumentError.new('Required arguments :reminder missing') if [:reminder].nil? post('reminders.delete', ) end |
#reminders_info(options = {}) ⇒ Object
Gets information about a reminder.
58 59 60 61 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 58 def reminders_info( = {}) throw ArgumentError.new('Required arguments :reminder missing') if [:reminder].nil? post('reminders.info', ) end |
#reminders_list(options = {}) ⇒ Object
Lists all reminders created by or for a given user.
68 69 70 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 68 def reminders_list( = {}) post('reminders.list', ) end |