module Redd::Clients::Base::Privatemessages

Methods that require the “privatemessages” scope

Public Instance Methods

my_messages(category = 'inbox', mark = false, params = {}) click to toggle source

Return a listing of a user's private messages.

@param category [“inbox”, “unread”, “sent”] The category of messages

to view.

@param mark [Boolean] Whether to remove the orangered from the

user's inbox.

@param params [Hash] A list of params to send with the request. @option params [String] :after Return results after the given

fullname.

@option params [String] :before Return results before the given

fullname.

@option params [Integer] :count (0) The number of items already seen

in the listing.

@option params [1..100] :limit (25) The maximum number of things to

return.
# File lib/redd/clients/base/privatemessages.rb, line 21
def my_messages(category = 'inbox', mark = false, params = {})
  params[:mark] = mark
  request_object(:get, "/message/#{category}.json", params)
end
read_all_messages() click to toggle source

Mark all messages as read.

# File lib/redd/clients/base/privatemessages.rb, line 27
def read_all_messages
  post('/api/read_all_messages')
end