gotransverse-tract-api 0.0.10 → 0.0.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 +6 -4
- 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: 2df7bfdc23c047c568bafc2141d9c84100e112ff
|
4
|
+
data.tar.gz: a2cca35a17232c9ddb2c5b84a791e94b1d497c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 434315489b02053ec4fee99cd5dea644863586a3ede2f03198f7d29c66ebfdf0e2a26145535ffd4c46c8a3a7616e59e44d4bdbba1783d5934216832ecfa441aa
|
7
|
+
data.tar.gz: 9e6cf7f380ecd0e1225843e0acfbe0d4093e364276d7ccdb90e77a7612dad82c2f2c93a5a4b3e229b52b1dfe17699bc66db01c8771d35513c12ba27823f570bb
|
@@ -175,16 +175,18 @@ module GoTransverseTractApi
|
|
175
175
|
|
176
176
|
headers = self.get_authentication_headers
|
177
177
|
|
178
|
-
# TODO:
|
178
|
+
# TODO: Camelize all keys in api_params Hash.
|
179
|
+
|
180
|
+
api_uri = URI.parse(api_url)
|
179
181
|
|
180
182
|
http_client = HTTPClient.new
|
181
183
|
case method
|
182
184
|
when :get
|
183
|
-
response = http_client.get(
|
185
|
+
response = http_client.get(api_uri, api_params, headers)
|
184
186
|
when :post
|
185
|
-
response = http_client.post(
|
187
|
+
response = http_client.post(api_uri, api_params, headers)
|
186
188
|
when :put
|
187
|
-
response = http_client.put(
|
189
|
+
response = http_client.put(api_uri, api_params, headers)
|
188
190
|
end
|
189
191
|
|
190
192
|
Nokogiri::XML(response.body.to_s)
|