polygonio 0.2.2 → 0.2.3

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: 9b2f97cba4b8dce047b360b501ffa104b30b9a3da30739a1bf1120f8bf3f6585
4
- data.tar.gz: 568b4be6bfee84037928cb94680d2b941026911055eb61b08634fe436422d4bb
3
+ metadata.gz: 446ecfd9d5cf484b172d9a767150be21c32adb6b43dbaa2bd43d627742198805
4
+ data.tar.gz: 33021285249515775f8e3eb77a078b37829bd9b1a06ab9e5cbf89b58be8b1278
5
5
  SHA512:
6
- metadata.gz: bf74c0026b4ce7782966273a34074fc7cbfca7ced1b79a3fcd52538ad9ad3cbd5646a8f0a22f12acff69275bb1c52f3334d40e2be96b23fa30cc9434fa850b4f
7
- data.tar.gz: cef06cff038f3ddc91b513cc5d7489f69eb7d9231c883f26f107467e85f27076887f18094d3d14f5ffc42bb5a296c9ebe90812046a6abfb8c598498b01301e3b
6
+ metadata.gz: 9c675ca09240c00299d9eb73c069ae565eff4dcbfa331b6c1c87623a32ef35e5304080435a6d55f6ad45f0210f38958906d67de75ad36e213eda5fc9cfb0be2f
7
+ data.tar.gz: ecdedbfdc23870f9844a28c570fb6fe9ff448a6a81a3aec1a4531b438e7e0f9d23607d11dd1744841dd394fc5d3e839504916ba63713010ab9a113a6e6b3134c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polygonio (0.2.2)
4
+ polygonio (0.2.3)
5
5
  activesupport (~> 6.0, >= 6.0.2.2)
6
6
  dry-struct (~> 1.2, >= 1.2.0)
7
7
  dry-types (~> 1.2, >= 1.2.2)
@@ -16,33 +16,31 @@ PATH
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- activesupport (6.0.2.2)
19
+ activesupport (6.1.0)
20
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
- i18n (>= 0.7, < 2)
22
- minitest (~> 5.1)
23
- tzinfo (~> 1.1)
24
- zeitwerk (~> 2.2)
21
+ i18n (>= 1.6, < 2)
22
+ minitest (>= 5.1)
23
+ tzinfo (~> 2.0)
24
+ zeitwerk (~> 2.3)
25
25
  ast (2.4.0)
26
26
  bundler-audit (0.6.1)
27
27
  bundler (>= 1.2.0, < 3)
28
28
  thor (~> 0.18)
29
29
  concurrent-ruby (1.1.6)
30
30
  dotenv (2.7.5)
31
- dry-configurable (0.11.5)
31
+ dry-configurable (0.12.0)
32
32
  concurrent-ruby (~> 1.0)
33
- dry-core (~> 0.4, >= 0.4.7)
34
- dry-equalizer (~> 0.2)
33
+ dry-core (~> 0.5, >= 0.5.0)
35
34
  dry-container (0.7.2)
36
35
  concurrent-ruby (~> 1.0)
37
36
  dry-configurable (~> 0.1, >= 0.1.3)
38
- dry-core (0.4.9)
37
+ dry-core (0.5.0)
39
38
  concurrent-ruby (~> 1.0)
40
39
  dry-equalizer (0.3.0)
41
40
  dry-inflector (0.2.0)
42
- dry-logic (1.0.6)
41
+ dry-logic (1.1.0)
43
42
  concurrent-ruby (~> 1.0)
44
- dry-core (~> 0.2)
45
- dry-equalizer (~> 0.2)
43
+ dry-core (~> 0.5, >= 0.5)
46
44
  dry-struct (1.3.0)
47
45
  dry-core (~> 0.4, >= 0.4.4)
48
46
  dry-equalizer (~> 0.3)
@@ -72,7 +70,7 @@ GEM
72
70
  jaro_winkler (1.5.4)
73
71
  minitest (5.14.0)
74
72
  multipart-post (2.1.1)
75
- oj (3.10.6)
73
+ oj (3.10.18)
76
74
  parallel (1.19.1)
77
75
  parser (2.7.0.5)
78
76
  ast (~> 2.4.0)
@@ -92,15 +90,14 @@ GEM
92
90
  rubocop (>= 0.71.0)
93
91
  ruby-progressbar (1.10.1)
94
92
  thor (0.20.3)
95
- thread_safe (0.3.6)
96
- tzinfo (1.2.7)
97
- thread_safe (~> 0.1)
93
+ tzinfo (2.0.4)
94
+ concurrent-ruby (~> 1.0)
98
95
  unicode-display_width (1.6.1)
99
96
  vcr (5.1.0)
100
- websocket-driver (0.7.1)
97
+ websocket-driver (0.7.3)
101
98
  websocket-extensions (>= 0.1.0)
102
- websocket-extensions (0.1.4)
103
- zeitwerk (2.3.0)
99
+ websocket-extensions (0.1.5)
100
+ zeitwerk (2.4.2)
104
101
 
105
102
  PLATFORMS
106
103
  ruby
data/README.md CHANGED
@@ -43,8 +43,8 @@ client.forex.historic_ticks
43
43
 
44
44
  client.crypto.list # list exchanges
45
45
 
46
- Polgygonio::Websocket::Client.new(api_key).subscribe("XQ.BTC-USD") do |event|
46
+ Polygonio::Websocket::Client.new("crypto", api_key).subscribe("XQ.BTC-USD") do |event|
47
47
  pp "Incoming message"
48
48
  pp event
49
49
  end
50
- ```
50
+ ```
@@ -11,7 +11,7 @@ module Polygonio
11
11
  attribute :locale, Types::String
12
12
  attribute :currency, Types::String
13
13
  attribute :active, Types::Bool
14
- attribute :primary_exch, Types::String
14
+ attribute :primary_exch?, Types::String
15
15
  attribute? :type, Types::String
16
16
  attribute? :codes do
17
17
  attribute? :cik, Types::String
@@ -9,9 +9,10 @@ module Polygonio
9
9
 
10
10
  attr_reader :url, :api_key
11
11
 
12
- def initialize(api_key)
12
+ def initialize(api_key, &block)
13
13
  @url = BASE_URL
14
14
  @api_key = Types::String[api_key]
15
+ @request_builder = block if block_given?
15
16
  end
16
17
 
17
18
  RETRY_OPTIONS = {
@@ -26,6 +27,7 @@ module Polygonio
26
27
  Faraday.new(url: "#{url}?apiKey=#{api_key}") do |builder|
27
28
  builder.request :retry, RETRY_OPTIONS
28
29
  builder.use ErrorMiddleware
30
+ @request_builder&.call(builder)
29
31
  builder.request :json
30
32
  builder.response :oj
31
33
  builder.adapter Faraday.default_adapter
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polygonio
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polygonio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lance Carlson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2021-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport