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

Instance Method Details

#blockObject

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_readObject

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_unreadObject

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