Skip to content

Latest commit

 

History

History
135 lines (86 loc) · 2.89 KB

File metadata and controls

135 lines (86 loc) · 2.89 KB

OpenapiClient::IngredientsApi

All URIs are relative to https://wizard-world-api.herokuapp.com

Method HTTP request Description
ingredients_get GET /Ingredients
ingredients_id_get GET /Ingredients/{id}

ingredients_get

<Array> ingredients_get(opts)

Examples

require 'time'
require 'openapi_client'

api_instance = OpenapiClient::IngredientsApi.new
opts = {
  name: 'name_example' # String | 
}

begin
  
  result = api_instance.ingredients_get(opts)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling IngredientsApi->ingredients_get: #{e}"
end

Using the ingredients_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> ingredients_get_with_http_info(opts)

begin
  
  data, status_code, headers = api_instance.ingredients_get_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<IngredientDto>>
rescue OpenapiClient::ApiError => e
  puts "Error when calling IngredientsApi->ingredients_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
name String [optional]

Return type

Array<IngredientDto>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

ingredients_id_get

ingredients_id_get(id)

Examples

require 'time'
require 'openapi_client'

api_instance = OpenapiClient::IngredientsApi.new
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | 

begin
  
  result = api_instance.ingredients_id_get(id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling IngredientsApi->ingredients_id_get: #{e}"
end

Using the ingredients_id_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> ingredients_id_get_with_http_info(id)

begin
  
  data, status_code, headers = api_instance.ingredients_id_get_with_http_info(id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <IngredientDto>
rescue OpenapiClient::ApiError => e
  puts "Error when calling IngredientsApi->ingredients_id_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id String

Return type

IngredientDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json