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.
19 20 21 22 23 24 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 19 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.
33 34 35 36 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 33 def reminders_complete( = {}) throw ArgumentError.new('Required arguments :reminder missing') if [:reminder].nil? post('reminders.complete', ) end |
#reminders_delete(options = {}) ⇒ Object
Deletes a reminder.
45 46 47 48 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 45 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.
57 58 59 60 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 57 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.
67 68 69 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 67 def reminders_list( = {}) post('reminders.list', ) end |