Module: Redd::Models::Inboxable
- Included in:
- Comment, PrivateMessage
- Defined in:
- lib/redd/models/inboxable.rb
Overview
Things that can be sent to a user’s inbox.
Instance Method Summary collapse
-
#block ⇒ Object
Block the user that sent this item.
-
#mark_as_read ⇒ Object
Mark this thing as read.
-
#mark_as_unread ⇒ Object
Mark one or more messages as unread.
Instance Method Details
#block ⇒ Object
Block the user that sent this item.
8 9 10 |
# File 'lib/redd/models/inboxable.rb', line 8 def block @client.post('/api/block', id: get_attribute(:name)) end |
#mark_as_read ⇒ Object
Mark this thing as read.
13 14 15 |
# File 'lib/redd/models/inboxable.rb', line 13 def mark_as_read @client.post('/api/read_message', id: get_attribute(:name)) end |
#mark_as_unread ⇒ Object
Mark one or more messages as unread.
18 19 20 |
# File 'lib/redd/models/inboxable.rb', line 18 def mark_as_unread @client.post('/api/unread_message', id: get_attribute(:name)) end |