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.
24 25 26 27 28 29 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 24 def reminders_add( = {}) raise ArgumentError, 'Required arguments :text missing' if [:text].nil? raise ArgumentError, '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.
40 41 42 43 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 40 def reminders_complete( = {}) raise ArgumentError, 'Required arguments :reminder missing' if [:reminder].nil? post('reminders.complete', ) end |
#reminders_delete(options = {}) ⇒ Object
Deletes a reminder.
54 55 56 57 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 54 def reminders_delete( = {}) raise ArgumentError, 'Required arguments :reminder missing' if [:reminder].nil? post('reminders.delete', ) end |
#reminders_info(options = {}) ⇒ Object
Gets information about a reminder.
68 69 70 71 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 68 def reminders_info( = {}) raise ArgumentError, '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.
80 81 82 |
# File 'lib/slack/web/api/endpoints/reminders.rb', line 80 def reminders_list( = {}) post('reminders.list', ) end |