module HomeAway::API::Domain::AddMessage

Public Instance Methods

add_message(conversation_id, message, opts={}) click to toggle source

Add a Message to a Conversation

analogous to calling a POST on API url /public/addMessage

@note user must be logged in via 3 legged oauth to call this function without error

Headers:

  • X-HomeAway-DisplayLocale: If a locale is not specified in a query param, it will be searched for in the X-HomeAway-DisplayLocale Header. If it is not supplied in either area the default locale of the user will be selected if it exists. Otherwise the Accept-Language Header will be used.

@param conversation_id [String] The Conversation UUID to load. @param message [String] The body of the message to add to the given conversation. @return [HomeAway::API::Response] the result of the call to the API

# File lib/homeaway/api/domain/add_message.rb, line 33
def add_message(conversation_id, message, opts={})
  body = {
      'message' => message.to_s,
  }.merge(HomeAway::API::Util::Validators.query_keys(opts))
  params = {
      'conversationId' => HomeAway::API::Util::Validators.uuid(conversation_id)
  }
  post '/public/addMessage', body, params
end