All URIs are relative to https://wizard-world-api.herokuapp.com
Method | HTTP request | Description |
---|---|---|
spells_get | GET /Spells | |
spells_id_get | GET /Spells/{id} |
<Array> spells_get(opts)
require 'time'
require 'openapi_client'
api_instance = OpenapiClient::SpellsApi.new
opts = {
name: 'name_example', # String |
type: OpenapiClient::SpellType::NONE, # SpellType |
incantation: 'incantation_example' # String |
}
begin
result = api_instance.spells_get(opts)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling SpellsApi->spells_get: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> spells_get_with_http_info(opts)
begin
data, status_code, headers = api_instance.spells_get_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<SpellDto>>
rescue OpenapiClient::ApiError => e
puts "Error when calling SpellsApi->spells_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
name | String | [optional] | |
type | SpellType | [optional] | |
incantation | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
spells_id_get(id)
require 'time'
require 'openapi_client'
api_instance = OpenapiClient::SpellsApi.new
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
begin
result = api_instance.spells_id_get(id)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling SpellsApi->spells_id_get: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> spells_id_get_with_http_info(id)
begin
data, status_code, headers = api_instance.spells_id_get_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <SpellDto>
rescue OpenapiClient::ApiError => e
puts "Error when calling SpellsApi->spells_id_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String |
No authorization required
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json