Module: Redd::Objects::Thing::Inboxable

Included in:
Comment, PrivateMessage
Defined in:
lib/redd/objects/thing/inboxable.rb

Overview

Things that can be sent to a user’s inbox.

Instance Method Summary collapse

Instance Method Details

#mark_as_readObject

Mark this thing as read.



7
8
9
# File 'lib/redd/objects/thing/inboxable.rb', line 7

def mark_as_read
  post('/api/read_message', id: fullname)
end

#mark_as_unreadObject

Mark one or more messages as unread.



12
13
14
# File 'lib/redd/objects/thing/inboxable.rb', line 12

def mark_as_unread
  post('/api/unread_message', id: fullname)
end

#reply(text) ⇒ Objects::Comment, Objects::PrivateMessage

Reply to the thing.

Parameters:

  • text (String)

    The text to comment.

Returns:



19
20
21
# File 'lib/redd/objects/thing/inboxable.rb', line 19

def reply(text)
  client.add_comment(self, text)
end