ruby/lib/openapi_client/api/misc_api.rb
def talk_to_chatbot_with_http_info(text, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MiscApi.talk_to_chatbot ...'
      end
      # verify the required parameter 'text' is set
      if @api_client.config.client_side_validation && text.nil?
        fail ArgumentError, "Missing the required parameter 'text' when calling MiscApi.talk_to_chatbot"
      end
      # resource path
      local_var_path = '/food/converse'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'text'] = text
      query_params[:'contextId'] = opts[:'context_id'] if !opts[:'context_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:body] 

      # return_type
      return_type = opts[:return_type] || 'InlineResponse20056' 

      # auth_names
      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: MiscApi#talk_to_chatbot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Talk to Chatbot
# This endpoint can be used to have a conversation about food with the spoonacular chatbot. Use the \&quot;Get Conversation Suggests\&quot; endpoint to show your user what he or she can say.
# @param text [String] The request / question / answer from the user to the chatbot.
# @param [Hash] opts the optional parameters
# @option opts [String] :context_id An arbitrary globally unique id for your conversation. The conversation can contain states so you should pass your context id if you want the bot to be able to remember the conversation.
# @return [Array<(InlineResponse20056, Integer, Hash)>] InlineResponse20056 data, response status code and response headers
Talk to Chatbot
This endpoint can be used to have a conversation about food with the spoonacular chatbot. Use the \"Get Conversation Suggests\" endpoint to show your user what he or she can say.
Talk to Chatbot This endpoint can be used to have a conversation about food with the spoonacular chatbot . Use the \ " Get Conversation Suggests \ " endpoint to show your user what he or she can say .
def talk_to_chatbot_with_http_info(text, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MiscApi.talk_to_chatbot ...'
      end
      if @api_client.config.client_side_validation && text.nil?
        fail ArgumentError, "Missing the required parameter 'text' when calling MiscApi.talk_to_chatbot"
      end
      local_var_path = '/food/converse'
      query_params = opts[:query_params] || {}
      query_params[:'text'] = text
      query_params[:'contextId'] = opts[:'context_id'] if !opts[:'context_id'].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] || 'InlineResponse20056' 
      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: MiscApi#talk_to_chatbot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def talk_to_chatbot_with_http_info ( text , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MiscApi.talk_to_chatbot ...' end if @api_client . config . client_side_validation && text . nil? fail ArgumentError , "Missing the required parameter 'text' when calling MiscApi.talk_to_chatbot" end local_var_path = '/food/converse' query_params = opts [ :query_params ] || { } query_params [ :' text ' ] = text query_params [ :' contextId ' ] = opts [ :' context_id ' ] if ! opts [ :' context_id ' ] . 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 ] || 'InlineResponse20056' 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: MiscApi#talk_to_chatbot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Talk to Chatbot
This endpoint can be used to have a conversation about food with the spoonacular chatbot.
Talk to Chatbot This endpoint can be used to have a conversation about food with the spoonacular chatbot .
# verify the required parameter 'text' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
InlineResponse20056 data, response status code and response headers
InlineResponse20056 data response status code and response headers
Array<(InlineResponse20056, Integer, Hash)>
text
The request / question / answer from the user to the chatbot.
The request / question / answer from the user to the chatbot .
opts
:context_id An arbitrary globally unique id for your conversation. The conversation can contain states so you should pass your context id if you want the bot to be able to remember the conversation.
: context_id An arbitrary globally unique id for your conversation . The conversation can contain states so you should pass your context id if you want the bot to be able to remember the conversation .
opts the optional parameters
opts the optional parameters