Module: Slack::Endpoint::Chat
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/chat.rb
Instance Method Summary collapse
-
#chat_delete(options = {}) ⇒ Object
Deletes a message.
-
#chat_postMessage(options = {}) ⇒ Object
Sends a message to a channel.
-
#chat_update(options = {}) ⇒ Object
Updates a message.
Instance Method Details
#chat_delete(options = {}) ⇒ Object
Deletes a message.
16 17 18 19 20 |
# File 'lib/slack/endpoint/chat.rb', line 16 def chat_delete(={}) throw ArgumentError.new("Required arguments :ts missing") if [:ts].nil? throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("chat.delete", ) end |
#chat_postMessage(options = {}) ⇒ Object
Sends a message to a channel.
48 49 50 51 52 |
# File 'lib/slack/endpoint/chat.rb', line 48 def chat_postMessage(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :text missing") if [:text].nil? post("chat.postMessage", ) end |
#chat_update(options = {}) ⇒ Object
Updates a message.
66 67 68 69 70 71 |
# File 'lib/slack/endpoint/chat.rb', line 66 def chat_update(={}) throw ArgumentError.new("Required arguments :ts missing") if [:ts].nil? throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :text missing") if [:text].nil? post("chat.update", ) end |