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: read_attribute(:name))
end

#collapseObject

Collapse the item.


13
14
15
# File 'lib/redd/models/inboxable.rb', line 13

def collapse
  client.post('/api/collapse_message', id: read_attribute(:name))
end

#mark_as_readObject

Mark this thing as read.


23
24
25
# File 'lib/redd/models/inboxable.rb', line 23

def mark_as_read
  client.post('/api/read_message', id: read_attribute(:name))
end

#mark_as_unreadObject

Mark one or more messages as unread.


28
29
30
# File 'lib/redd/models/inboxable.rb', line 28

def mark_as_unread
  client.post('/api/unread_message', id: read_attribute(:name))
end

#uncollapseObject

Uncollapse the item.


18
19
20
# File 'lib/redd/models/inboxable.rb', line 18

def uncollapse
  client.post('/api/uncollapse_message', id: read_attribute(:name))
end