Module: Remind101::Client::Messages
- Included in:
- Remind101::Client
- Defined in:
- lib/remind101/client/messages.rb
Instance Method Summary collapse
-
#delete_message(message_id) ⇒ Object
Public: Destroy an existing message.
-
#get_message(id) ⇒ Object
Public: Returns a single message for the current user.
-
#get_messages(options = {}) ⇒ Object
Public: Returns all messages for the current user.
-
#post_message(hash) ⇒ Object
Public: Creates a new message.
Instance Method Details
#delete_message(message_id) ⇒ Object
Public: Destroy an existing message.
Examples
remind101. 4321
Returns the faraday response.
43 44 45 |
# File 'lib/remind101/client/messages.rb', line 43 def () api_delete("/messages/#{}") end |
#get_message(id) ⇒ Object
Public: Returns a single message for the current user.
Examples
remind101.(1234)
Returns the faraday response.
21 22 23 |
# File 'lib/remind101/client/messages.rb', line 21 def (id) api_get("/messages/#{id}") end |
#get_messages(options = {}) ⇒ Object
Public: Returns all messages for the current user.
Examples
remind101.
Returns the faraday response.
10 11 12 |
# File 'lib/remind101/client/messages.rb', line 10 def ( = {}) api_get('/messages', ) end |
#post_message(hash) ⇒ Object
Public: Creates a new message.
Examples
remind101. message: { body: 'Hello World!', group_ids: [1234] }
Returns the faraday response.
32 33 34 |
# File 'lib/remind101/client/messages.rb', line 32 def (hash) api_post('/messages', hash) end |