sensei_eod_utils 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/eod_facade/eod.rb +7 -1
- data/lib/eod_facade/fundamentals.rb +7 -1
- data/lib/eod_facade/options.rb +7 -1
- data/sensei_eod_utils.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cb6c28f42078f02638317b202aa1dd68a577ed036755a506a0dd5b72afc50c1
|
4
|
+
data.tar.gz: 607269da1000a107852f91df1eaa845ef0fae6d2ceccc7dbc237ef354c5ed706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60acc1944b881fce9e85aa268f36c0ce2d4610b447f6a63a6e71b47f88c37778ad6601502f29fa8e4e9ef7be5b4af01171a149c5c9c75d41e96aa8880d97d325
|
7
|
+
data.tar.gz: d7b8cb3840589fb1a4f9d12794584d1f2defb4308b333a90d9f5feab5d79b95706dee0b9a212feced62f11d9ebd443bd9181ee09f9db6a829fdd008ed6f6e711
|
data/lib/eod_facade/eod.rb
CHANGED
@@ -4,7 +4,13 @@ module EodFacade
|
|
4
4
|
class Eod < ::EodFacade::Base
|
5
5
|
class << self
|
6
6
|
def call(symbol, params = {})
|
7
|
-
make_request(url_path(symbol), params.merge(fmt: 'json'))
|
7
|
+
response = make_request(url_path(symbol), params.merge(fmt: 'json'))
|
8
|
+
|
9
|
+
unless response.success?
|
10
|
+
raise ArgumentError, "Error fetching end of day data for #{symbol}"
|
11
|
+
end
|
12
|
+
|
13
|
+
response.parsed_response
|
8
14
|
end
|
9
15
|
|
10
16
|
private
|
@@ -6,7 +6,13 @@ module EodFacade
|
|
6
6
|
class Fundamentals < ::EodFacade::Base
|
7
7
|
class << self
|
8
8
|
def call(symbol)
|
9
|
-
make_request(url_path(symbol))
|
9
|
+
response = make_request(url_path(symbol))
|
10
|
+
|
11
|
+
unless response.success?
|
12
|
+
raise ArgumentError, "Error fetching fundamentals data for #{symbol}"
|
13
|
+
end
|
14
|
+
|
15
|
+
response.parsed_response
|
10
16
|
end
|
11
17
|
|
12
18
|
private
|
data/lib/eod_facade/options.rb
CHANGED
@@ -13,7 +13,13 @@ module EodFacade
|
|
13
13
|
raise ArgumentError, "Invalid expiration date for option #{symbol}"
|
14
14
|
end
|
15
15
|
|
16
|
-
make_request(url_path(underlying), params(expiry))
|
16
|
+
response = make_request(url_path(underlying), params(expiry))
|
17
|
+
|
18
|
+
unless response.success?
|
19
|
+
raise ArgumentError, "Error fetching options data for #{symbol}"
|
20
|
+
end
|
21
|
+
|
22
|
+
response.parsed_response
|
17
23
|
end
|
18
24
|
|
19
25
|
private
|
data/sensei_eod_utils.gemspec
CHANGED