Sha256: 57adc465cc9431a5c12f8368aff7ed9525705995693b4c7d0e3eee9f8ae9a9c0

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

module Redd
  module Clients
    class Base
      # Methods that require the "privatemessages" scope
      module Privatemessages
        # 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.
        def my_messages(category = "inbox", mark = false, params = {})
          params[:mark] = mark
          request_object(:get, "/message/#{category}.json", params)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
redd-0.7.4 lib/redd/clients/base/privatemessages.rb
redd-0.7.3 lib/redd/clients/base/privatemessages.rb
redd-0.7.2 lib/redd/clients/base/privatemessages.rb
redd-0.7.1 lib/redd/clients/base/privatemessages.rb
redd-0.7.0 lib/redd/clients/base/privatemessages.rb