Class: Redd::Models::PrivateMessage
- Inherits:
-
LazyModel
- Object
- BasicModel
- LazyModel
- Redd::Models::PrivateMessage
- Defined in:
- lib/redd/models/private_message.rb
Overview
A private message
Instance Attribute Summary
Attributes inherited from BasicModel
Instance Method Summary collapse
-
#delete ⇒ Object
Delete the message from the user’s inbox.
-
#mute_author ⇒ Object
Mute the author of the message.
-
#unmute_author ⇒ Object
Unmute the author of the message.
Methods included from Replyable
Methods included from Inboxable
#block, #mark_as_read, #mark_as_unread
Methods inherited from LazyModel
#force_load, #initialize, #method_missing, #respond_to_missing?, #to_h
Methods inherited from BasicModel
from_id, #initialize, #inspect, #method_missing, #respond_to_missing?, #to_ary, #to_h
Constructor Details
This class inherits a constructor from Redd::Models::LazyModel
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Redd::Models::LazyModel
Instance Method Details
#delete ⇒ Object
Delete the message from the user’s inbox.
15 16 17 |
# File 'lib/redd/models/private_message.rb', line 15 def delete @client.post('/api/del_msg', id: get_attribute(:name)) end |
#mute_author ⇒ Object
Mute the author of the message.
20 21 22 |
# File 'lib/redd/models/private_message.rb', line 20 def @client.post('/api/mute_message_author', id: get_attribute(:name)) end |
#unmute_author ⇒ Object
Unmute the author of the message.
25 26 27 |
# File 'lib/redd/models/private_message.rb', line 25 def @client.post('/api/unmute_message_author', id: get_attribute(:name)) end |