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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d5ef3c880493aa1412b09e9378922cdaa2762bb53ecf6e3b20e73e936197c4f
4
- data.tar.gz: 2aef9b632c860f9b2d60a9f6c8460f58951a830c9fcf4afaff82606ad5bcaa4f
3
+ metadata.gz: 1cb6c28f42078f02638317b202aa1dd68a577ed036755a506a0dd5b72afc50c1
4
+ data.tar.gz: 607269da1000a107852f91df1eaa845ef0fae6d2ceccc7dbc237ef354c5ed706
5
5
  SHA512:
6
- metadata.gz: bb313e8c21940d5fe8f79bc5e4131a49ad89ee6f26c4362fb5c7b9a10a47401419276f6b4e0583f6eb3f8e757115e208b00ae4de1c4a7852fa7941b09f6ae07f
7
- data.tar.gz: fe0506c15059096065b883e65d36774354d6666ab330cad9136e7301f816bff44db1f26e0abe99536833c0c05a92605f6de19b8868921925e39624973942be3c
6
+ metadata.gz: 60acc1944b881fce9e85aa268f36c0ce2d4610b447f6a63a6e71b47f88c37778ad6601502f29fa8e4e9ef7be5b4af01171a149c5c9c75d41e96aa8880d97d325
7
+ data.tar.gz: d7b8cb3840589fb1a4f9d12794584d1f2defb4308b333a90d9f5feab5d79b95706dee0b9a212feced62f11d9ebd443bd9181ee09f9db6a829fdd008ed6f6e711
@@ -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
@@ -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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'sensei_eod_utils'
5
- s.version = '0.0.10'
5
+ s.version = '0.0.11'
6
6
  s.date = '2019-12-20'
7
7
  s.summary = 'Sensei trader utility functions and Eod api facade'
8
8
  s.authors = ['Nishant Shah']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensei_eod_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nishant Shah