lib/elasticsearch/api/actions/machine_learning/forecast.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/machine_learning/forecast.rb in elasticsearch-api-8.1.0

- old
+ new

@@ -26,18 +26,19 @@ # @option arguments [Time] :expires_in The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. # @option arguments [String] :max_model_memory The max memory able to be used by the forecast. Default is 20mb. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Query parameters can be specified in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/ml-forecast.html # def forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] - arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) + + arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast"