ruby/lib/openapi_client/api/meal_planning_api.rb
# Generate Meal Plan
# Generate a meal plan with three meals per day (breakfast, lunch, and dinner).
# @param [Hash] opts the optional parameters
# @option opts [String] :time_frame Either for one \&quot;day\&quot; or an entire \&quot;week\&quot;.
# @option opts [Float] :target_calories What is the caloric target for one day? The meal plan generator will try to get as close as possible to that goal.
# @option opts [String] :diet Enter a diet that the meal plan has to adhere to. See a full list of supported diets.
# @option opts [String] :exclude A comma-separated list of allergens or ingredients that must be excluded.
# @return [Array<(InlineResponse20037, Integer, Hash)>] InlineResponse20037 data, response status code and response headers
Generate Meal Plan
Generate a meal plan with three meals per day (breakfast, lunch, and dinner).
Generate Meal Plan Generate a meal plan with three meals per day ( breakfast lunch and dinner ) .
def generate_meal_plan_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MealPlanningApi.generate_meal_plan ...'
      end
      local_var_path = '/mealplanner/generate'
      query_params = opts[:query_params] || {}
      query_params[:'timeFrame'] = opts[:'time_frame'] if !opts[:'time_frame'].nil?
      query_params[:'targetCalories'] = opts[:'target_calories'] if !opts[:'target_calories'].nil?
      query_params[:'diet'] = opts[:'diet'] if !opts[:'diet'].nil?
      query_params[:'exclude'] = opts[:'exclude'] if !opts[:'exclude'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'InlineResponse20037' 
      auth_names = opts[:auth_names] || ['apiKeyScheme']
      new_options = opts.merge(
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MealPlanningApi#generate_meal_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def generate_meal_plan_with_http_info ( opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MealPlanningApi.generate_meal_plan ...' end local_var_path = '/mealplanner/generate' query_params = opts [ :query_params ] || { } query_params [ :' timeFrame ' ] = opts [ :' time_frame ' ] if ! opts [ :' time_frame ' ] . nil? query_params [ :' targetCalories ' ] = opts [ :' target_calories ' ] if ! opts [ :' target_calories ' ] . nil? query_params [ :' diet ' ] = opts [ :' diet ' ] if ! opts [ :' diet ' ] . nil? query_params [ :' exclude ' ] = opts [ :' exclude ' ] if ! opts [ :' exclude ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'InlineResponse20037' auth_names = opts [ :auth_names ] || [ 'apiKeyScheme' ] new_options = opts . merge ( :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :GET , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: MealPlanningApi#generate_meal_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Generate Meal Plan
Generate a meal plan with three meals per day (breakfast, lunch, and dinner).
Generate Meal Plan Generate a meal plan with three meals per day ( breakfast lunch and dinner ) .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
InlineResponse20037 data, response status code and response headers
InlineResponse20037 data response status code and response headers
Array<(InlineResponse20037, Integer, Hash)>
opts
:exclude A comma-separated list of allergens or ingredients that must be excluded.
: exclude A comma - separated list of allergens or ingredients that must be excluded .
opts the optional parameters
opts the optional parameters