pokeapi_client 1.0.0 → 1.2.0
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 +94 -25
- data/README.md +5 -5
- data/bin/byebug +1 -12
- data/bin/coderay +1 -12
- data/bin/htmldiff +1 -12
- data/bin/ldiff +1 -12
- data/bin/pry +1 -12
- data/bin/racc +1 -12
- data/bin/rake +1 -12
- data/bin/rspec +1 -12
- data/bin/rubocop +1 -12
- data/bin/ruby-parse +1 -12
- data/bin/ruby-rewrite +1 -12
- data/lib/pokeapi_client/api/ability_api.rb +3 -3
- data/lib/pokeapi_client/api/berry_api.rb +3 -3
- data/lib/pokeapi_client/api/berry_firmness_api.rb +3 -3
- data/lib/pokeapi_client/api/berry_flavor_api.rb +3 -3
- data/lib/pokeapi_client/api/characteristic_api.rb +3 -3
- data/lib/pokeapi_client/api/contest_effect_api.rb +3 -3
- data/lib/pokeapi_client/api/contest_type_api.rb +3 -3
- data/lib/pokeapi_client/api/egg_group_api.rb +3 -3
- data/lib/pokeapi_client/api/encounter_condition_api.rb +3 -3
- data/lib/pokeapi_client/api/encounter_condition_value_api.rb +3 -3
- data/lib/pokeapi_client/api/encounter_method_api.rb +3 -3
- data/lib/pokeapi_client/api/evolution_chain_api.rb +3 -3
- data/lib/pokeapi_client/api/evolution_trigger_api.rb +3 -3
- data/lib/pokeapi_client/api/gender_api.rb +3 -3
- data/lib/pokeapi_client/api/generation_api.rb +3 -3
- data/lib/pokeapi_client/api/growth_rate_api.rb +3 -3
- data/lib/pokeapi_client/api/item_api.rb +3 -3
- data/lib/pokeapi_client/api/item_attribute_api.rb +3 -3
- data/lib/pokeapi_client/api/item_category_api.rb +3 -3
- data/lib/pokeapi_client/api/item_fling_effect_api.rb +3 -3
- data/lib/pokeapi_client/api/item_pocket_api.rb +3 -3
- data/lib/pokeapi_client/api/language_api.rb +3 -3
- data/lib/pokeapi_client/api/location_api.rb +3 -3
- data/lib/pokeapi_client/api/location_area_api.rb +3 -3
- data/lib/pokeapi_client/api/machine_api.rb +3 -3
- data/lib/pokeapi_client/api/move_ailment_api.rb +3 -3
- data/lib/pokeapi_client/api/move_api.rb +3 -3
- data/lib/pokeapi_client/api/move_battle_style_api.rb +3 -3
- data/lib/pokeapi_client/api/move_category_api.rb +3 -3
- data/lib/pokeapi_client/api/move_damage_class_api.rb +3 -3
- data/lib/pokeapi_client/api/move_learn_method_api.rb +3 -3
- data/lib/pokeapi_client/api/move_target_api.rb +3 -3
- data/lib/pokeapi_client/api/nature_api.rb +3 -3
- data/lib/pokeapi_client/api/pal_park_area_api.rb +3 -3
- data/lib/pokeapi_client/api/pokeathlon_stat_api.rb +3 -3
- data/lib/pokeapi_client/api/pokedex_api.rb +3 -3
- data/lib/pokeapi_client/api/pokemon_api.rb +3 -3
- data/lib/pokeapi_client/api/pokemon_color_api.rb +3 -3
- data/lib/pokeapi_client/api/pokemon_form_api.rb +3 -3
- data/lib/pokeapi_client/api/pokemon_habitat_api.rb +3 -3
- data/lib/pokeapi_client/api/pokemon_shape_api.rb +3 -3
- data/lib/pokeapi_client/api/pokemon_species_api.rb +3 -3
- data/lib/pokeapi_client/api/region_api.rb +3 -3
- data/lib/pokeapi_client/api/stat_api.rb +3 -3
- data/lib/pokeapi_client/api/super_contest_effect_api.rb +3 -3
- data/lib/pokeapi_client/api/type_api.rb +3 -3
- data/lib/pokeapi_client/api/version_api.rb +3 -3
- data/lib/pokeapi_client/api/version_group_api.rb +3 -3
- data/lib/pokeapi_client/api_client.rb +16 -13
- data/lib/pokeapi_client/api_error.rb +1 -1
- data/lib/pokeapi_client/api_model_base.rb +88 -0
- data/lib/pokeapi_client/configuration.rb +11 -1
- data/lib/pokeapi_client/version.rb +2 -2
- data/lib/pokeapi_client.rb +2 -1
- data/pokeapi_client.gemspec +1 -1
- data/spec/api/ability_api_spec.rb +1 -1
- data/spec/api/berry_api_spec.rb +1 -1
- data/spec/api/berry_firmness_api_spec.rb +1 -1
- data/spec/api/berry_flavor_api_spec.rb +1 -1
- data/spec/api/characteristic_api_spec.rb +1 -1
- data/spec/api/contest_effect_api_spec.rb +1 -1
- data/spec/api/contest_type_api_spec.rb +1 -1
- data/spec/api/egg_group_api_spec.rb +1 -1
- data/spec/api/encounter_condition_api_spec.rb +1 -1
- data/spec/api/encounter_condition_value_api_spec.rb +1 -1
- data/spec/api/encounter_method_api_spec.rb +1 -1
- data/spec/api/evolution_chain_api_spec.rb +1 -1
- data/spec/api/evolution_trigger_api_spec.rb +1 -1
- data/spec/api/gender_api_spec.rb +1 -1
- data/spec/api/generation_api_spec.rb +1 -1
- data/spec/api/growth_rate_api_spec.rb +1 -1
- data/spec/api/item_api_spec.rb +1 -1
- data/spec/api/item_attribute_api_spec.rb +1 -1
- data/spec/api/item_category_api_spec.rb +1 -1
- data/spec/api/item_fling_effect_api_spec.rb +1 -1
- data/spec/api/item_pocket_api_spec.rb +1 -1
- data/spec/api/language_api_spec.rb +1 -1
- data/spec/api/location_api_spec.rb +1 -1
- data/spec/api/location_area_api_spec.rb +1 -1
- data/spec/api/machine_api_spec.rb +1 -1
- data/spec/api/move_ailment_api_spec.rb +1 -1
- data/spec/api/move_api_spec.rb +1 -1
- data/spec/api/move_battle_style_api_spec.rb +1 -1
- data/spec/api/move_category_api_spec.rb +1 -1
- data/spec/api/move_damage_class_api_spec.rb +1 -1
- data/spec/api/move_learn_method_api_spec.rb +1 -1
- data/spec/api/move_target_api_spec.rb +1 -1
- data/spec/api/nature_api_spec.rb +1 -1
- data/spec/api/pal_park_area_api_spec.rb +1 -1
- data/spec/api/pokeathlon_stat_api_spec.rb +1 -1
- data/spec/api/pokedex_api_spec.rb +1 -1
- data/spec/api/pokemon_api_spec.rb +1 -1
- data/spec/api/pokemon_color_api_spec.rb +1 -1
- data/spec/api/pokemon_form_api_spec.rb +1 -1
- data/spec/api/pokemon_habitat_api_spec.rb +1 -1
- data/spec/api/pokemon_shape_api_spec.rb +1 -1
- data/spec/api/pokemon_species_api_spec.rb +1 -1
- data/spec/api/region_api_spec.rb +1 -1
- data/spec/api/stat_api_spec.rb +1 -1
- data/spec/api/super_contest_effect_api_spec.rb +1 -1
- data/spec/api/type_api_spec.rb +1 -1
- data/spec/api/version_api_spec.rb +1 -1
- data/spec/api/version_group_api_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +42 -42
- data/bin/bundle +0 -109
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 20220523
|
|
7
7
|
Contact: blah+oapicf@cliffano.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.18.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -79,6 +79,14 @@ module PokeApiClient
|
|
|
79
79
|
# @return [true, false]
|
|
80
80
|
attr_accessor :debugging
|
|
81
81
|
|
|
82
|
+
# Set this to ignore operation servers for the API client. This is useful when you need to
|
|
83
|
+
# send requests to a different server than the one specified in the OpenAPI document.
|
|
84
|
+
# Will default to the base url defined in the spec but can be overridden by setting
|
|
85
|
+
# `scheme`, `host`, `base_path` directly.
|
|
86
|
+
# Default to false.
|
|
87
|
+
# @return [true, false]
|
|
88
|
+
attr_accessor :ignore_operation_servers
|
|
89
|
+
|
|
82
90
|
# Defines the logger used for debugging.
|
|
83
91
|
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
|
84
92
|
#
|
|
@@ -166,6 +174,7 @@ module PokeApiClient
|
|
|
166
174
|
@timeout = 0
|
|
167
175
|
@params_encoding = nil
|
|
168
176
|
@debugging = false
|
|
177
|
+
@ignore_operation_servers = false
|
|
169
178
|
@inject_format = false
|
|
170
179
|
@force_ending_format = false
|
|
171
180
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
|
@@ -200,6 +209,7 @@ module PokeApiClient
|
|
|
200
209
|
|
|
201
210
|
# Returns base URL for specified operation based on server settings
|
|
202
211
|
def base_url(operation = nil)
|
|
212
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
|
|
203
213
|
if operation_server_settings.key?(operation) then
|
|
204
214
|
index = server_operation_index.fetch(operation, server_index)
|
|
205
215
|
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
The version of the OpenAPI document: 20220523
|
|
7
7
|
Contact: blah+oapicf@cliffano.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.18.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module PokeApiClient
|
|
14
|
-
VERSION = '1.
|
|
14
|
+
VERSION = '1.2.0'
|
|
15
15
|
end
|
data/lib/pokeapi_client.rb
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
The version of the OpenAPI document: 20220523
|
|
7
7
|
Contact: blah+oapicf@cliffano.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.18.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
# Common files
|
|
14
14
|
require 'pokeapi_client/api_client'
|
|
15
15
|
require 'pokeapi_client/api_error'
|
|
16
|
+
require 'pokeapi_client/api_model_base'
|
|
16
17
|
require 'pokeapi_client/version'
|
|
17
18
|
require 'pokeapi_client/configuration'
|
|
18
19
|
|
data/pokeapi_client.gemspec
CHANGED
data/spec/api/berry_api_spec.rb
CHANGED
data/spec/api/gender_api_spec.rb
CHANGED
data/spec/api/item_api_spec.rb
CHANGED
data/spec/api/move_api_spec.rb
CHANGED
data/spec/api/nature_api_spec.rb
CHANGED
data/spec/api/region_api_spec.rb
CHANGED
data/spec/api/stat_api_spec.rb
CHANGED
data/spec/api/type_api_spec.rb
CHANGED