Module: Slack::Endpoint::Reminders

Included in:
Slack::Endpoint
Defined in:
lib/slack/endpoint/reminders.rb

Instance Method Summary collapse

Instance Method Details

#reminders_add(options = {}) ⇒ Object

Creates a reminder.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :text (Object)

    The content of the reminder

  • :time (Object)

    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”)

  • :user (Object)

    The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.

See Also:



18
19
20
21
22
# File 'lib/slack/endpoint/reminders.rb', line 18

def reminders_add(options={})
  throw ArgumentError.new("Required arguments :text missing") if options[:text].nil?
  throw ArgumentError.new("Required arguments :time missing") if options[:time].nil?
  post("reminders.add", options)
end

#reminders_complete(options = {}) ⇒ Object

Marks a reminder as complete.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :reminder (Object)

    The ID of the reminder to be marked as complete

See Also:



32
33
34
35
# File 'lib/slack/endpoint/reminders.rb', line 32

def reminders_complete(options={})
  throw ArgumentError.new("Required arguments :reminder missing") if options[:reminder].nil?
  post("reminders.complete", options)
end

#reminders_delete(options = {}) ⇒ Object

Deletes a reminder.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :reminder (Object)

    The ID of the reminder

See Also:



45
46
47
48
# File 'lib/slack/endpoint/reminders.rb', line 45

def reminders_delete(options={})
  throw ArgumentError.new("Required arguments :reminder missing") if options[:reminder].nil?
  post("reminders.delete", options)
end

#reminders_info(options = {}) ⇒ Object

Gets information about a reminder.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :reminder (Object)

    The ID of the reminder

See Also:



58
59
60
61
# File 'lib/slack/endpoint/reminders.rb', line 58

def reminders_info(options={})
  throw ArgumentError.new("Required arguments :reminder missing") if options[:reminder].nil?
  post("reminders.info", options)
end

#reminders_list(options = {}) ⇒ Object

Lists all reminders created by or for a given user.



69
70
71
# File 'lib/slack/endpoint/reminders.rb', line 69

def reminders_list(options={})
  post("reminders.list", options)
end