setsuzoku 0.10.12 → 0.11.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 +1 -1
- data/lib/setsuzoku/api_response.rb +1 -1
- data/lib/setsuzoku/api_strategy.rb +1 -1
- data/lib/setsuzoku/service/web_service/api_strategy.rb +3 -1
- data/lib/setsuzoku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 36e5b7968d72649e85fed697caf9d4b04613faa1b69e347bc347712743ddb55a
|
|
4
|
+
data.tar.gz: 11b0433cee31db3ffb7ee39d36c3c31dd4bab600b238a57a51519770d3453eff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27c41fe87bebe18b575359b471c3e7497292c5ba730b8698704352ad7f43f7a6d9824a8ee7d81c8d52e6d3dbb3247e7c4d3024b19cb1909c1e3bfc888fb0f823
|
|
7
|
+
data.tar.gz: 1352f256aacaeaa77d3565c5d14992bba7689717ea2c928485f3a4304b62b110db47b1c532ccb0266909f02719539c19ca8165c828973c4a8528ef8e74f23437
|
data/Gemfile.lock
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module Setsuzoku
|
|
5
5
|
# The generic API response object that all API responses should return.
|
|
6
6
|
class ApiResponse < T::Struct
|
|
7
|
-
prop :data, T.nilable(T
|
|
7
|
+
prop :data, T.nilable(T.untyped), default: {}
|
|
8
8
|
prop :success, T::Boolean, default: false
|
|
9
9
|
prop :error, T.nilable(String), default: nil
|
|
10
10
|
end
|
|
@@ -118,7 +118,7 @@ module Setsuzoku
|
|
|
118
118
|
# @param options [Hash] the parsing options. Generally the response_type. e.g. :xml, :json
|
|
119
119
|
#
|
|
120
120
|
# @return [Hash] the parsed hash of the response object.
|
|
121
|
-
sig { abstract.params(response: T.untyped, options: T.untyped).returns(T
|
|
121
|
+
sig { abstract.params(response: T.untyped, options: T.untyped).returns(T.untyped) }
|
|
122
122
|
def parse_response(response:, **options); end
|
|
123
123
|
end
|
|
124
124
|
end
|
|
@@ -72,13 +72,15 @@ module Setsuzoku
|
|
|
72
72
|
# @param options [Hash] the parsing options. Generally the response_type. e.g. :xml, :json
|
|
73
73
|
#
|
|
74
74
|
# @return [Hash] the parsed hash of the response object.
|
|
75
|
-
sig { override.params(response: Faraday::Response, options: T.untyped).returns(T
|
|
75
|
+
sig { override.params(response: Faraday::Response, options: T.untyped).returns(T.untyped) }
|
|
76
76
|
def parse_response(response:, **options)
|
|
77
77
|
case options[:response_type]
|
|
78
78
|
when :json
|
|
79
79
|
JSON.parse(response.body).deep_symbolize_keys
|
|
80
80
|
when :xml
|
|
81
81
|
convert_xml_to_hash(response.body)
|
|
82
|
+
when :html
|
|
83
|
+
response.body
|
|
82
84
|
else
|
|
83
85
|
JSON.parse(response.body).deep_symbolize_keys
|
|
84
86
|
end
|
data/lib/setsuzoku/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: setsuzoku
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luke Stadtler
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-08-
|
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|