ruby/lib/openapi_client/api/menu_items_api.rb
# Menu Item Nutrition Label Widget
# Visualize a menu item&#39;s nutritional label information as HTML including CSS.
# @param id [Float] The menu item id.
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :default_css Whether the default CSS should be added to the response.
# @option opts [Boolean] :show_optional_nutrients Whether to show optional nutrients.
# @option opts [Boolean] :show_zero_values Whether to show zero values.
# @option opts [Boolean] :show_ingredients Whether to show a list of ingredients.
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
Menu Item Nutrition Label Widget
Visualize a menu item's nutritional label information as HTML including CSS.
Menu Item Nutrition Label Widget Visualize a menu item ' s nutritional label information as HTML including CSS .
def menu_item_nutrition_label_widget_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MenuItemsApi.menu_item_nutrition_label_widget ...'
      end
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling MenuItemsApi.menu_item_nutrition_label_widget"
      end
      local_var_path = '/food/menuItems/{id}/nutritionLabel'.sub('{' + 'id' + '}', id.to_s)
      query_params = opts[:query_params] || {}
      query_params[:'defaultCss'] = opts[:'default_css'] if !opts[:'default_css'].nil?
      query_params[:'showOptionalNutrients'] = opts[:'show_optional_nutrients'] if !opts[:'show_optional_nutrients'].nil?
      query_params[:'showZeroValues'] = opts[:'show_zero_values'] if !opts[:'show_zero_values'].nil?
      query_params[:'showIngredients'] = opts[:'show_ingredients'] if !opts[:'show_ingredients'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['text/html'])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'String' 
      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: MenuItemsApi#menu_item_nutrition_label_widget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def menu_item_nutrition_label_widget_with_http_info ( id , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MenuItemsApi.menu_item_nutrition_label_widget ...' end if @api_client . config . client_side_validation && id . nil? fail ArgumentError , "Missing the required parameter 'id' when calling MenuItemsApi.menu_item_nutrition_label_widget" end local_var_path = '/food/menuItems/{id}/nutritionLabel' . sub ( '{' + 'id' + '}' , id . to_s ) query_params = opts [ :query_params ] || { } query_params [ :' defaultCss ' ] = opts [ :' default_css ' ] if ! opts [ :' default_css ' ] . nil? query_params [ :' showOptionalNutrients ' ] = opts [ :' show_optional_nutrients ' ] if ! opts [ :' show_optional_nutrients ' ] . nil? query_params [ :' showZeroValues ' ] = opts [ :' show_zero_values ' ] if ! opts [ :' show_zero_values ' ] . nil? query_params [ :' showIngredients ' ] = opts [ :' show_ingredients ' ] if ! opts [ :' show_ingredients ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'text/html' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'String' 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: MenuItemsApi#menu_item_nutrition_label_widget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Menu Item Nutrition Label Widget
Visualize a menu item&#39;s nutritional label information as HTML including CSS.
Menu Item Nutrition Label Widget Visualize a menu item&#39 ; s nutritional label information as HTML including CSS .
# verify the required parameter 'id' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
String data, response status code and response headers
String data response status code and response headers
Array<(String, Integer, Hash)>
id
The menu item id.
The menu item id .
opts
:show_ingredients Whether to show a list of ingredients.
: show_ingredients Whether to show a list of ingredients .
opts the optional parameters
opts the optional parameters