coin_market_pro 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5d17f07be79da69922c5737daa7e9d0c518ce5f3d082a0b530c6478f332096e
4
- data.tar.gz: af126477e9dfa0fea53b1e6e8eab8db454bf722592e164ee53e538149913c1bd
3
+ metadata.gz: 904b8b650bf03c99956e5fd9c29b2051bfdd95e0fda84a39e0059395506c6ef2
4
+ data.tar.gz: b3655679e77c37e6896e27bc79a4e7f618f8b6eb1f6792721be27768bd2abfa3
5
5
  SHA512:
6
- metadata.gz: 6a0e6ab9fac771c8393d97452d89169b920ef7a37adc5d192b623ab5dd497254e625ab8e45518c247b46999d8604e8d407992b20a14cc86587444e6c25fa549a
7
- data.tar.gz: 448c47f2cd89f66ae37754c79f03c2a1db9c9eba74839cdaa2459a1999b1961dc664322b2e7b530907071795ee8a28479cd86281a9fc4af7a360c6c65e2872d3
6
+ metadata.gz: 174481ee3a4f1755304b79d615696d0b55244f0fd6add16c2aa841ca69a3fb9981db52269f8578fb5e012240fd9557e4dcc1f1df236957f92e2e5613099e4bee
7
+ data.tar.gz: 0a0c18f1822e0c9e864c0c6763c52d3a20488fddcbc4e244dc6768695b4ebeb1ecc096de463308e25e7c21044326787859958e08dd2531d6dc86ff35b57536aa
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coin_market_pro (0.1.1)
4
+ coin_market_pro (0.1.2)
5
5
  activesupport (~> 5.1)
6
6
  multi_json (~> 1.13)
7
7
  rest-client (~> 2.0)
@@ -5,7 +5,11 @@ require 'active_support/core_ext/object'
5
5
  require 'rest_client'
6
6
 
7
7
  require_relative './result'
8
- Dir['./lib/coin_market_pro/endpoint/**/*.rb'].each { |f| require f }
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 = resp.body.map { |_k, data| data }
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 = resp.body.map { |_key, data| data }
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 = resp.body.map { |_key, data| data }
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 = resp.body.map { |_k, data| data }
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 = resp.body.map { |_k, data| data }
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CoinMarketPro
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coin_market_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - snogrammer