coin_market_pro 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 904b8b650bf03c99956e5fd9c29b2051bfdd95e0fda84a39e0059395506c6ef2
|
4
|
+
data.tar.gz: b3655679e77c37e6896e27bc79a4e7f618f8b6eb1f6792721be27768bd2abfa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 174481ee3a4f1755304b79d615696d0b55244f0fd6add16c2aa841ca69a3fb9981db52269f8578fb5e012240fd9557e4dcc1f1df236957f92e2e5613099e4bee
|
7
|
+
data.tar.gz: 0a0c18f1822e0c9e864c0c6763c52d3a20488fddcbc4e244dc6768695b4ebeb1ecc096de463308e25e7c21044326787859958e08dd2531d6dc86ff35b57536aa
|
data/Gemfile.lock
CHANGED
@@ -5,7 +5,11 @@ require 'active_support/core_ext/object'
|
|
5
5
|
require 'rest_client'
|
6
6
|
|
7
7
|
require_relative './result'
|
8
|
-
|
8
|
+
require_relative '../endpoint/base'
|
9
|
+
require_relative '../endpoint/cryptocurrency'
|
10
|
+
require_relative '../endpoint/exchange'
|
11
|
+
require_relative '../endpoint/global_metrics'
|
12
|
+
require_relative '../endpoint/tools'
|
9
13
|
|
10
14
|
module CoinMarketPro
|
11
15
|
module Client
|
@@ -21,7 +21,11 @@ module CoinMarketPro
|
|
21
21
|
valid_params?(args)
|
22
22
|
params = convert_params(args)
|
23
23
|
client.get("#{ENDPOINT}/info", options: params.compact).tap do |resp|
|
24
|
-
resp.body =
|
24
|
+
resp.body = begin
|
25
|
+
resp.body.map { |_k, data| data }
|
26
|
+
rescue StandardError
|
27
|
+
[]
|
28
|
+
end
|
25
29
|
end
|
26
30
|
end
|
27
31
|
|
@@ -169,7 +173,11 @@ module CoinMarketPro
|
|
169
173
|
valid_params?(args)
|
170
174
|
params = convert_params(args)
|
171
175
|
client.get("#{ENDPOINT}/ohlcv/latest", options: params.compact).tap do |resp|
|
172
|
-
resp.body =
|
176
|
+
resp.body = begin
|
177
|
+
resp.body.map { |_k, data| data }
|
178
|
+
rescue StandardError
|
179
|
+
[]
|
180
|
+
end
|
173
181
|
end
|
174
182
|
end
|
175
183
|
|
@@ -224,7 +232,11 @@ module CoinMarketPro
|
|
224
232
|
valid_params?(args)
|
225
233
|
params = convert_params(args)
|
226
234
|
client.get("#{ENDPOINT}/quotes/latest", options: params.compact).tap do |resp|
|
227
|
-
resp.body =
|
235
|
+
resp.body = begin
|
236
|
+
resp.body.map { |_k, data| data }
|
237
|
+
rescue StandardError
|
238
|
+
[]
|
239
|
+
end
|
228
240
|
end
|
229
241
|
end
|
230
242
|
|
@@ -20,7 +20,11 @@ module CoinMarketPro
|
|
20
20
|
valid_params?(args)
|
21
21
|
params = convert_params(args)
|
22
22
|
client.get("#{ENDPOINT}/info", options: params.compact).tap do |resp|
|
23
|
-
resp.body =
|
23
|
+
resp.body = begin
|
24
|
+
resp.body.map { |_k, data| data }
|
25
|
+
rescue StandardError
|
26
|
+
[]
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
|
@@ -139,7 +143,11 @@ module CoinMarketPro
|
|
139
143
|
valid_params?(args)
|
140
144
|
params = convert_params(args)
|
141
145
|
client.get("#{ENDPOINT}/quotes/latest", options: params.compact).tap do |resp|
|
142
|
-
resp.body =
|
146
|
+
resp.body = begin
|
147
|
+
resp.body.map { |_k, data| data }
|
148
|
+
rescue StandardError
|
149
|
+
[]
|
150
|
+
end
|
143
151
|
end
|
144
152
|
end
|
145
153
|
|