in elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb [49:78]
def post_behavioral_analytics_event(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'search_application.post_behavioral_analytics_event' }
defined_params = [:collection_name, :event_type].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
end
request_opts[:defined_params] = defined_params unless defined_params.empty?
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
raise ArgumentError, "Required argument 'collection_name' missing" unless arguments[:collection_name]
raise ArgumentError, "Required argument 'event_type' missing" unless arguments[:event_type]
arguments = arguments.clone
headers = arguments.delete(:headers) || {}
body = arguments.delete(:body)
_collection_name = arguments.delete(:collection_name)
_event_type = arguments.delete(:event_type)
method = Elasticsearch::API::HTTP_POST
path = "_application/analytics/#{Utils.listify(_collection_name)}/event/#{Utils.listify(_event_type)}"
params = Utils.process_params(arguments)
Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end