gotransverse-tract-api 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gotransverse-tract-api.rb +16 -1
- data/lib/gotransverse-tract-api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88250c8ad973dce0f0fb946c95afffd4464108ae
|
4
|
+
data.tar.gz: 0dbf4570be311926880524c37b79755f96ac9603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07b58279cdeca0554c2cfad92e88f643dee4ce3415dea0c3d74027ed6a533e53639b721e7683c61a86fb7525409be315dee2f5d3e4f3e41fd2ea5f3fdf0922a5
|
7
|
+
data.tar.gz: 50c56299d1d8af06f8a64308e9e9fc5c9c12b9c5173166b2ba4454826237dede5cfdad2a85d800b8286f80e6860abbd9852db7e4424aa115f7c3dcf87c8b97db
|
@@ -176,7 +176,8 @@ module GoTransverseTractApi
|
|
176
176
|
#
|
177
177
|
def self.call(api_url, api_params={}, method=:get, request_body="")
|
178
178
|
|
179
|
-
#
|
179
|
+
# Camelize parameters
|
180
|
+
api_params = camelize_keys(api_params)
|
180
181
|
|
181
182
|
http_client = HTTPClient.new
|
182
183
|
http_client.set_auth(nil, GoTransverseTractApi.configuration.username, GoTransverseTractApi.configuration.password)
|
@@ -193,4 +194,18 @@ module GoTransverseTractApi
|
|
193
194
|
Nokogiri::XML(response.body.to_s)
|
194
195
|
end
|
195
196
|
|
197
|
+
#
|
198
|
+
# self.camelize_keys
|
199
|
+
#
|
200
|
+
# @param {hash} hsh
|
201
|
+
#
|
202
|
+
def self.camelize_keys hsh
|
203
|
+
hsh.keys.each do |k|
|
204
|
+
new_key = k.to_s.camelize(:lower)
|
205
|
+
new_key = new_key.to_sym if k.is_a? Symbol
|
206
|
+
hsh[new_key] = hsh.delete(k)
|
207
|
+
end
|
208
|
+
hsh
|
209
|
+
end
|
210
|
+
|
196
211
|
end
|