Module: Slack::Endpoint::Reminders
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/reminders.rb
Instance Method Summary collapse
-
#reminders_add(options = {}) ⇒ Object
This method creates a reminder.
-
#reminders_complete(options = {}) ⇒ Object
This method completes a reminder.
-
#reminders_delete(options = {}) ⇒ Object
This method deletes a reminder.
-
#reminders_info(options = {}) ⇒ Object
This method returns information about a reminder.
-
#reminders_list(options = {}) ⇒ Object
This method lists all reminders created by or for a given user.
Instance Method Details
#reminders_add(options = {}) ⇒ Object
This method creates a reminder.
18 19 20 21 22 23 |
# File 'lib/slack/endpoint/reminders.rb', line 18 def reminders_add(={}) throw ArgumentError.new("Required arguments :text missing") if [:text].nil? throw ArgumentError.new("Required arguments :time missing") if [:time].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reminders.add", ) end |
#reminders_complete(options = {}) ⇒ Object
This method completes a reminder.
33 34 35 36 37 |
# File 'lib/slack/endpoint/reminders.rb', line 33 def reminders_complete(={}) throw ArgumentError.new("Required arguments :reminder missing") if [:reminder].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reminders.complete", ) end |
#reminders_delete(options = {}) ⇒ Object
This method deletes a reminder.
47 48 49 50 51 |
# File 'lib/slack/endpoint/reminders.rb', line 47 def reminders_delete(={}) throw ArgumentError.new("Required arguments :reminder missing") if [:reminder].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reminders.delete", ) end |
#reminders_info(options = {}) ⇒ Object
This method returns information about a reminder.
61 62 63 64 65 |
# File 'lib/slack/endpoint/reminders.rb', line 61 def reminders_info(={}) throw ArgumentError.new("Required arguments :reminder missing") if [:reminder].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reminders.info", ) end |
#reminders_list(options = {}) ⇒ Object
This method lists all reminders created by or for a given user.
73 74 75 76 |
# File 'lib/slack/endpoint/reminders.rb', line 73 def reminders_list(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("reminders.list", ) end |