Class: Redd::Objects::PrivateMessage

Inherits:
Thing
  • Object
show all
Includes:
Thing::Inboxable
Defined in:
lib/redd/objects/private_message.rb

Overview

The model for private messages

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods included from Thing::Inboxable

#reply

Methods inherited from Thing

#==, #fullname

Methods inherited from Base

alias_property, #initialize

Constructor Details

This class inherits a constructor from Redd::Objects::Base

Instance Method Details

#block_sender!Object

Block the sender of the message from sending any more.



13
14
15
# File 'lib/redd/objects/private_message.rb', line 13

def block_sender!
  post('/api/block', id: fullname)
end

#mark_as_readObject

Mark the message as read.



18
19
20
# File 'lib/redd/objects/private_message.rb', line 18

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

#mark_as_unreadObject

Mark the message as unread and add orangered to account.



23
24
25
# File 'lib/redd/objects/private_message.rb', line 23

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