pokeapi_client 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -5
- data/lib/pokeapi_client/api/ability_api.rb +138 -0
- data/lib/pokeapi_client/api/berry_api.rb +138 -0
- data/lib/pokeapi_client/api/berry_firmness_api.rb +138 -0
- data/lib/pokeapi_client/api/berry_flavor_api.rb +138 -0
- data/lib/pokeapi_client/api/characteristic_api.rb +138 -0
- data/lib/pokeapi_client/api/contest_effect_api.rb +138 -0
- data/lib/pokeapi_client/api/contest_type_api.rb +138 -0
- data/lib/pokeapi_client/api/egg_group_api.rb +138 -0
- data/lib/pokeapi_client/api/encounter_condition_api.rb +138 -0
- data/lib/pokeapi_client/api/encounter_condition_value_api.rb +138 -0
- data/lib/pokeapi_client/api/encounter_method_api.rb +138 -0
- data/lib/pokeapi_client/api/evolution_chain_api.rb +138 -0
- data/lib/pokeapi_client/api/evolution_trigger_api.rb +138 -0
- data/lib/pokeapi_client/api/gender_api.rb +138 -0
- data/lib/pokeapi_client/api/generation_api.rb +138 -0
- data/lib/pokeapi_client/api/growth_rate_api.rb +138 -0
- data/lib/pokeapi_client/api/item_api.rb +138 -0
- data/lib/pokeapi_client/api/item_attribute_api.rb +138 -0
- data/lib/pokeapi_client/api/item_category_api.rb +138 -0
- data/lib/pokeapi_client/api/item_fling_effect_api.rb +138 -0
- data/lib/pokeapi_client/api/item_pocket_api.rb +138 -0
- data/lib/pokeapi_client/api/language_api.rb +138 -0
- data/lib/pokeapi_client/api/location_api.rb +138 -0
- data/lib/pokeapi_client/api/location_area_api.rb +138 -0
- data/lib/pokeapi_client/api/machine_api.rb +138 -0
- data/lib/pokeapi_client/api/move_ailment_api.rb +138 -0
- data/lib/pokeapi_client/api/move_api.rb +138 -0
- data/lib/pokeapi_client/api/move_battle_style_api.rb +138 -0
- data/lib/pokeapi_client/api/move_category_api.rb +138 -0
- data/lib/pokeapi_client/api/move_damage_class_api.rb +138 -0
- data/lib/pokeapi_client/api/move_learn_method_api.rb +138 -0
- data/lib/pokeapi_client/api/move_target_api.rb +138 -0
- data/lib/pokeapi_client/api/nature_api.rb +138 -0
- data/lib/pokeapi_client/api/pal_park_area_api.rb +138 -0
- data/lib/pokeapi_client/api/pokeathlon_stat_api.rb +138 -0
- data/lib/pokeapi_client/api/pokedex_api.rb +138 -0
- data/lib/pokeapi_client/api/pokemon_api.rb +138 -0
- data/lib/pokeapi_client/api/pokemon_color_api.rb +138 -0
- data/lib/pokeapi_client/api/pokemon_form_api.rb +138 -0
- data/lib/pokeapi_client/api/pokemon_habitat_api.rb +138 -0
- data/lib/pokeapi_client/api/pokemon_shape_api.rb +138 -0
- data/lib/pokeapi_client/api/pokemon_species_api.rb +138 -0
- data/lib/pokeapi_client/api/region_api.rb +138 -0
- data/lib/pokeapi_client/api/stat_api.rb +138 -0
- data/lib/pokeapi_client/api/super_contest_effect_api.rb +138 -0
- data/lib/pokeapi_client/api/type_api.rb +138 -0
- data/lib/pokeapi_client/api/version_api.rb +138 -0
- data/lib/pokeapi_client/api/version_group_api.rb +138 -0
- data/lib/pokeapi_client/api_client.rb +387 -0
- data/lib/pokeapi_client/api_error.rb +55 -0
- data/lib/pokeapi_client/configuration.rb +269 -0
- data/lib/pokeapi_client/version.rb +13 -0
- data/lib/pokeapi_client.rb +85 -0
- data/pokeapi_client.gemspec +3 -3
- data/spec/api/ability_api_spec.rb +4 -4
- data/spec/api/berry_api_spec.rb +4 -4
- data/spec/api/berry_firmness_api_spec.rb +4 -4
- data/spec/api/berry_flavor_api_spec.rb +4 -4
- data/spec/api/characteristic_api_spec.rb +4 -4
- data/spec/api/contest_effect_api_spec.rb +4 -4
- data/spec/api/contest_type_api_spec.rb +4 -4
- data/spec/api/egg_group_api_spec.rb +4 -4
- data/spec/api/encounter_condition_api_spec.rb +4 -4
- data/spec/api/encounter_condition_value_api_spec.rb +4 -4
- data/spec/api/encounter_method_api_spec.rb +4 -4
- data/spec/api/evolution_chain_api_spec.rb +4 -4
- data/spec/api/evolution_trigger_api_spec.rb +4 -4
- data/spec/api/gender_api_spec.rb +4 -4
- data/spec/api/generation_api_spec.rb +4 -4
- data/spec/api/growth_rate_api_spec.rb +4 -4
- data/spec/api/item_api_spec.rb +4 -4
- data/spec/api/item_attribute_api_spec.rb +4 -4
- data/spec/api/item_category_api_spec.rb +4 -4
- data/spec/api/item_fling_effect_api_spec.rb +4 -4
- data/spec/api/item_pocket_api_spec.rb +4 -4
- data/spec/api/language_api_spec.rb +4 -4
- data/spec/api/location_api_spec.rb +4 -4
- data/spec/api/location_area_api_spec.rb +4 -4
- data/spec/api/machine_api_spec.rb +4 -4
- data/spec/api/move_ailment_api_spec.rb +4 -4
- data/spec/api/move_api_spec.rb +4 -4
- data/spec/api/move_battle_style_api_spec.rb +4 -4
- data/spec/api/move_category_api_spec.rb +4 -4
- data/spec/api/move_damage_class_api_spec.rb +4 -4
- data/spec/api/move_learn_method_api_spec.rb +4 -4
- data/spec/api/move_target_api_spec.rb +4 -4
- data/spec/api/nature_api_spec.rb +4 -4
- data/spec/api/pal_park_area_api_spec.rb +4 -4
- data/spec/api/pokeathlon_stat_api_spec.rb +4 -4
- data/spec/api/pokedex_api_spec.rb +4 -4
- data/spec/api/pokemon_api_spec.rb +4 -4
- data/spec/api/pokemon_color_api_spec.rb +4 -4
- data/spec/api/pokemon_form_api_spec.rb +4 -4
- data/spec/api/pokemon_habitat_api_spec.rb +4 -4
- data/spec/api/pokemon_shape_api_spec.rb +4 -4
- data/spec/api/pokemon_species_api_spec.rb +4 -4
- data/spec/api/region_api_spec.rb +4 -4
- data/spec/api/stat_api_spec.rb +4 -4
- data/spec/api/super_contest_effect_api_spec.rb +4 -4
- data/spec/api/type_api_spec.rb +4 -4
- data/spec/api/version_api_spec.rb +4 -4
- data/spec/api/version_group_api_spec.rb +4 -4
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +92 -39
@@ -0,0 +1,138 @@
|
|
1
|
+
=begin
|
2
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 20220523
|
5
|
+
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
OpenAPI Generator version: 5.4.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module PokeApiClient
|
14
|
+
class PokeathlonStatApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# @param [Hash] opts the optional parameters
|
21
|
+
# @option opts [Integer] :limit
|
22
|
+
# @option opts [Integer] :offset
|
23
|
+
# @return [String]
|
24
|
+
def pokeathlon_stat_list(opts = {})
|
25
|
+
data, _status_code, _headers = pokeathlon_stat_list_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @option opts [Integer] :limit
|
31
|
+
# @option opts [Integer] :offset
|
32
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
33
|
+
def pokeathlon_stat_list_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: PokeathlonStatApi.pokeathlon_stat_list ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/api/v2/pokeathlon-stat/'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = opts[:query_params] || {}
|
42
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
43
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'String'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"PokeathlonStatApi.pokeathlon_stat_list",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: PokeathlonStatApi#pokeathlon_stat_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
79
|
+
# @param id [Integer]
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [String]
|
82
|
+
def pokeathlon_stat_read(id, opts = {})
|
83
|
+
data, _status_code, _headers = pokeathlon_stat_read_with_http_info(id, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# @param id [Integer]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
90
|
+
def pokeathlon_stat_read_with_http_info(id, opts = {})
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug 'Calling API: PokeathlonStatApi.pokeathlon_stat_read ...'
|
93
|
+
end
|
94
|
+
# verify the required parameter 'id' is set
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PokeathlonStatApi.pokeathlon_stat_read"
|
97
|
+
end
|
98
|
+
# resource path
|
99
|
+
local_var_path = '/api/v2/pokeathlon-stat/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
100
|
+
|
101
|
+
# query parameters
|
102
|
+
query_params = opts[:query_params] || {}
|
103
|
+
|
104
|
+
# header parameters
|
105
|
+
header_params = opts[:header_params] || {}
|
106
|
+
# HTTP header 'Accept' (if needed)
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
108
|
+
|
109
|
+
# form parameters
|
110
|
+
form_params = opts[:form_params] || {}
|
111
|
+
|
112
|
+
# http body (model)
|
113
|
+
post_body = opts[:debug_body]
|
114
|
+
|
115
|
+
# return_type
|
116
|
+
return_type = opts[:debug_return_type] || 'String'
|
117
|
+
|
118
|
+
# auth_names
|
119
|
+
auth_names = opts[:debug_auth_names] || []
|
120
|
+
|
121
|
+
new_options = opts.merge(
|
122
|
+
:operation => :"PokeathlonStatApi.pokeathlon_stat_read",
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => return_type
|
129
|
+
)
|
130
|
+
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: PokeathlonStatApi#pokeathlon_stat_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
=begin
|
2
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 20220523
|
5
|
+
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
OpenAPI Generator version: 5.4.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module PokeApiClient
|
14
|
+
class PokedexApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# @param [Hash] opts the optional parameters
|
21
|
+
# @option opts [Integer] :limit
|
22
|
+
# @option opts [Integer] :offset
|
23
|
+
# @return [String]
|
24
|
+
def pokedex_list(opts = {})
|
25
|
+
data, _status_code, _headers = pokedex_list_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @option opts [Integer] :limit
|
31
|
+
# @option opts [Integer] :offset
|
32
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
33
|
+
def pokedex_list_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: PokedexApi.pokedex_list ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/api/v2/pokedex/'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = opts[:query_params] || {}
|
42
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
43
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'String'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"PokedexApi.pokedex_list",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: PokedexApi#pokedex_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
79
|
+
# @param id [Integer]
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [String]
|
82
|
+
def pokedex_read(id, opts = {})
|
83
|
+
data, _status_code, _headers = pokedex_read_with_http_info(id, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# @param id [Integer]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
90
|
+
def pokedex_read_with_http_info(id, opts = {})
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug 'Calling API: PokedexApi.pokedex_read ...'
|
93
|
+
end
|
94
|
+
# verify the required parameter 'id' is set
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PokedexApi.pokedex_read"
|
97
|
+
end
|
98
|
+
# resource path
|
99
|
+
local_var_path = '/api/v2/pokedex/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
100
|
+
|
101
|
+
# query parameters
|
102
|
+
query_params = opts[:query_params] || {}
|
103
|
+
|
104
|
+
# header parameters
|
105
|
+
header_params = opts[:header_params] || {}
|
106
|
+
# HTTP header 'Accept' (if needed)
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
108
|
+
|
109
|
+
# form parameters
|
110
|
+
form_params = opts[:form_params] || {}
|
111
|
+
|
112
|
+
# http body (model)
|
113
|
+
post_body = opts[:debug_body]
|
114
|
+
|
115
|
+
# return_type
|
116
|
+
return_type = opts[:debug_return_type] || 'String'
|
117
|
+
|
118
|
+
# auth_names
|
119
|
+
auth_names = opts[:debug_auth_names] || []
|
120
|
+
|
121
|
+
new_options = opts.merge(
|
122
|
+
:operation => :"PokedexApi.pokedex_read",
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => return_type
|
129
|
+
)
|
130
|
+
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: PokedexApi#pokedex_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
=begin
|
2
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 20220523
|
5
|
+
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
OpenAPI Generator version: 5.4.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module PokeApiClient
|
14
|
+
class PokemonApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# @param [Hash] opts the optional parameters
|
21
|
+
# @option opts [Integer] :limit
|
22
|
+
# @option opts [Integer] :offset
|
23
|
+
# @return [String]
|
24
|
+
def pokemon_list(opts = {})
|
25
|
+
data, _status_code, _headers = pokemon_list_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @option opts [Integer] :limit
|
31
|
+
# @option opts [Integer] :offset
|
32
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
33
|
+
def pokemon_list_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: PokemonApi.pokemon_list ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/api/v2/pokemon/'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = opts[:query_params] || {}
|
42
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
43
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'String'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"PokemonApi.pokemon_list",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: PokemonApi#pokemon_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
79
|
+
# @param id [Integer]
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [String]
|
82
|
+
def pokemon_read(id, opts = {})
|
83
|
+
data, _status_code, _headers = pokemon_read_with_http_info(id, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# @param id [Integer]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
90
|
+
def pokemon_read_with_http_info(id, opts = {})
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug 'Calling API: PokemonApi.pokemon_read ...'
|
93
|
+
end
|
94
|
+
# verify the required parameter 'id' is set
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PokemonApi.pokemon_read"
|
97
|
+
end
|
98
|
+
# resource path
|
99
|
+
local_var_path = '/api/v2/pokemon/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
100
|
+
|
101
|
+
# query parameters
|
102
|
+
query_params = opts[:query_params] || {}
|
103
|
+
|
104
|
+
# header parameters
|
105
|
+
header_params = opts[:header_params] || {}
|
106
|
+
# HTTP header 'Accept' (if needed)
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
108
|
+
|
109
|
+
# form parameters
|
110
|
+
form_params = opts[:form_params] || {}
|
111
|
+
|
112
|
+
# http body (model)
|
113
|
+
post_body = opts[:debug_body]
|
114
|
+
|
115
|
+
# return_type
|
116
|
+
return_type = opts[:debug_return_type] || 'String'
|
117
|
+
|
118
|
+
# auth_names
|
119
|
+
auth_names = opts[:debug_auth_names] || []
|
120
|
+
|
121
|
+
new_options = opts.merge(
|
122
|
+
:operation => :"PokemonApi.pokemon_read",
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => return_type
|
129
|
+
)
|
130
|
+
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: PokemonApi#pokemon_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
=begin
|
2
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 20220523
|
5
|
+
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
OpenAPI Generator version: 5.4.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module PokeApiClient
|
14
|
+
class PokemonColorApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# @param [Hash] opts the optional parameters
|
21
|
+
# @option opts [Integer] :limit
|
22
|
+
# @option opts [Integer] :offset
|
23
|
+
# @return [String]
|
24
|
+
def pokemon_color_list(opts = {})
|
25
|
+
data, _status_code, _headers = pokemon_color_list_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @option opts [Integer] :limit
|
31
|
+
# @option opts [Integer] :offset
|
32
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
33
|
+
def pokemon_color_list_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: PokemonColorApi.pokemon_color_list ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/api/v2/pokemon-color/'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = opts[:query_params] || {}
|
42
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
43
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'String'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"PokemonColorApi.pokemon_color_list",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: PokemonColorApi#pokemon_color_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
79
|
+
# @param id [Integer]
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [String]
|
82
|
+
def pokemon_color_read(id, opts = {})
|
83
|
+
data, _status_code, _headers = pokemon_color_read_with_http_info(id, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# @param id [Integer]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
90
|
+
def pokemon_color_read_with_http_info(id, opts = {})
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug 'Calling API: PokemonColorApi.pokemon_color_read ...'
|
93
|
+
end
|
94
|
+
# verify the required parameter 'id' is set
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PokemonColorApi.pokemon_color_read"
|
97
|
+
end
|
98
|
+
# resource path
|
99
|
+
local_var_path = '/api/v2/pokemon-color/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
100
|
+
|
101
|
+
# query parameters
|
102
|
+
query_params = opts[:query_params] || {}
|
103
|
+
|
104
|
+
# header parameters
|
105
|
+
header_params = opts[:header_params] || {}
|
106
|
+
# HTTP header 'Accept' (if needed)
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
108
|
+
|
109
|
+
# form parameters
|
110
|
+
form_params = opts[:form_params] || {}
|
111
|
+
|
112
|
+
# http body (model)
|
113
|
+
post_body = opts[:debug_body]
|
114
|
+
|
115
|
+
# return_type
|
116
|
+
return_type = opts[:debug_return_type] || 'String'
|
117
|
+
|
118
|
+
# auth_names
|
119
|
+
auth_names = opts[:debug_auth_names] || []
|
120
|
+
|
121
|
+
new_options = opts.merge(
|
122
|
+
:operation => :"PokemonColorApi.pokemon_color_read",
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => return_type
|
129
|
+
)
|
130
|
+
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: PokemonColorApi#pokemon_color_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
=begin
|
2
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 20220523
|
5
|
+
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
OpenAPI Generator version: 5.4.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module PokeApiClient
|
14
|
+
class PokemonFormApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# @param [Hash] opts the optional parameters
|
21
|
+
# @option opts [Integer] :limit
|
22
|
+
# @option opts [Integer] :offset
|
23
|
+
# @return [String]
|
24
|
+
def pokemon_form_list(opts = {})
|
25
|
+
data, _status_code, _headers = pokemon_form_list_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @option opts [Integer] :limit
|
31
|
+
# @option opts [Integer] :offset
|
32
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
33
|
+
def pokemon_form_list_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: PokemonFormApi.pokemon_form_list ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/api/v2/pokemon-form/'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = opts[:query_params] || {}
|
42
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
43
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'String'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"PokemonFormApi.pokemon_form_list",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: PokemonFormApi#pokemon_form_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
79
|
+
# @param id [Integer]
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [String]
|
82
|
+
def pokemon_form_read(id, opts = {})
|
83
|
+
data, _status_code, _headers = pokemon_form_read_with_http_info(id, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# @param id [Integer]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
90
|
+
def pokemon_form_read_with_http_info(id, opts = {})
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug 'Calling API: PokemonFormApi.pokemon_form_read ...'
|
93
|
+
end
|
94
|
+
# verify the required parameter 'id' is set
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PokemonFormApi.pokemon_form_read"
|
97
|
+
end
|
98
|
+
# resource path
|
99
|
+
local_var_path = '/api/v2/pokemon-form/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
100
|
+
|
101
|
+
# query parameters
|
102
|
+
query_params = opts[:query_params] || {}
|
103
|
+
|
104
|
+
# header parameters
|
105
|
+
header_params = opts[:header_params] || {}
|
106
|
+
# HTTP header 'Accept' (if needed)
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
108
|
+
|
109
|
+
# form parameters
|
110
|
+
form_params = opts[:form_params] || {}
|
111
|
+
|
112
|
+
# http body (model)
|
113
|
+
post_body = opts[:debug_body]
|
114
|
+
|
115
|
+
# return_type
|
116
|
+
return_type = opts[:debug_return_type] || 'String'
|
117
|
+
|
118
|
+
# auth_names
|
119
|
+
auth_names = opts[:debug_auth_names] || []
|
120
|
+
|
121
|
+
new_options = opts.merge(
|
122
|
+
:operation => :"PokemonFormApi.pokemon_form_read",
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => return_type
|
129
|
+
)
|
130
|
+
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: PokemonFormApi#pokemon_form_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|