Class: Purest::Messages

Inherits:
APIMethods show all
Defined in:
lib/purest/messages.rb

Constant Summary collapse

GET_PARAMS =
%i[audit flagged login open recent user].freeze

Instance Method Summary collapse

Methods inherited from APIMethods

#append_path, #create, #delete

Methods inherited from Rest

access_method?, #authenticated?, #concat_url, #initialize, #logout, method_missing, #use_named_parameter

Constructor Details

This class inherits a constructor from Purest::Rest

Instance Method Details

#get(options = nil) ⇒ Object



9
10
11
# File 'lib/purest/messages.rb', line 9

def get(options = nil)
  super(options, 'message', GET_PARAMS)
end

#update(options = nil) ⇒ Object



13
14
15
16
17
18
# File 'lib/purest/messages.rb', line 13

def update(options = nil)
  # In this case, 'id' is the identifier of a message,
  # not its name
  appended_path = options.delete(:id) if options[:id]
  super(options, 'message', appended_path)
end