polygonio 0.1.0 → 0.2.1

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: cb0ff578b04db8fe6b41f9a3244b4659b0f6d23dd394e29ff64e0237a3f9374c
4
- data.tar.gz: 1d56b28b3eff0e966dad4229d224df0537bc2e9629c56f8dc3cf37122b521996
3
+ metadata.gz: f726bca0ec10c4396c8abcd465f6c9bd4dee1d792a37f1bc3615e9a500e3f9f4
4
+ data.tar.gz: 10c0629ee52ecceb9fc3c5dd6f4a8d45d2c97dd4ff6960acc1e0acf039e8ea1e
5
5
  SHA512:
6
- metadata.gz: 2a6a1e9f20f1134030737810b1242572745eccc840f90f1871dcff1ce9d1fbf00b7338b87171f8ef35da6352eb3398028e905edf45fcca963080ddb0517c4168
7
- data.tar.gz: 3844d43a7caa11833c11c5fff6d993612c3378c2b6b916b97006e1a17eb31afd89b413e1f5da7615b51b046829472a54bd62257f09c37bf38e1fc8bffe69c8c4
6
+ metadata.gz: 69975cee522f0cd4ffd3ab3a660cb0e1c5549a14aebeedf1166feb5841c1aee9fcd56e787f5c2d37b0c8e2748dcb1d6b5f1eac693ca1f68461e2382c2ddf213f
7
+ data.tar.gz: 3227e2dfa5456ea7b9fc1f2d4dd9788f36c214f6fa021969db63672c33fc261f9eee27e26636cf0aedf370473675ef9bd91aad4bf97aa36828a9efab33c94600
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polygonio (0.1.0)
4
+ polygonio (0.2.1)
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)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # PolygonClient (Ruby)
1
+ # PolygonioClient (Ruby)
2
2
 
3
3
  ## Table of Contents
4
4
 
@@ -15,7 +15,7 @@ This is a client library for Polygon.io. Please see [Polygon.io](https://polygon
15
15
  Add this line to your application's Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'polygon_client'
18
+ gem 'polygonio'
19
19
  ```
20
20
 
21
21
  And then execute:
@@ -32,18 +32,18 @@ All methods follow the documentation found [here]:https://polygon.io/docs pretty
32
32
 
33
33
 
34
34
  ```ruby
35
- client = PolygonClient::Rest::Client.new(api_key)
35
+ client = Polygonio::Rest::Client.new(api_key)
36
36
 
37
37
  # See tests for a full reference of all of methods
38
38
  client.reference.tickers.list
39
39
 
40
- client.stocks.
40
+ client.stocks.list_exchanges
41
41
 
42
42
  client.forex.historic_ticks
43
43
 
44
44
  client.crypto.list # list exchanges
45
45
 
46
- PolgygonClient::Websocket::Client.new(api_key).subscribe("XQ.BTC-USD") do |event|
46
+ Polgygonio::Websocket::Client.new(api_key).subscribe("XQ.BTC-USD") do |event|
47
47
  pp "Incoming message"
48
48
  pp event
49
49
  end
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "polygon_client"
4
+ require "polygonio"
5
5
  require "dotenv/load"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  class Crypto < PolygonRestHandler
6
6
  class CryptoExchange < PolygonResponse
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  class Forex < PolygonRestHandler
6
6
  class HistoricTicksResponse < PolygonResponse
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  module Reference
6
6
  class Locales < PolygonRestHandler
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  module Reference
6
6
  class Markets < PolygonRestHandler
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  module Reference
6
6
  class Stocks < PolygonRestHandler
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  module Reference
6
6
  class Tickers < PolygonRestHandler
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  class Stocks < PolygonRestHandler
6
6
  class StockExchange < PolygonResponse
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  class PolygonResponse < Dry::Struct
6
6
  NUMBERS_TO_WORDS = {
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Rest
5
5
  class Client
6
6
  Struct.new("Reference", :locales, :markets, :stocks, :tickers)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Errors
5
5
  class PolygonRestClientError < StandardError; end
6
6
 
File without changes
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Types
5
5
  include Dry::Types(default: :strict)
6
6
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Polygonio
4
+ VERSION = "0.2.1"
5
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Websocket
5
5
  module Connection
6
6
  attr_accessor :url
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Websocket
5
5
  module Errors
6
6
  class PolygonWebsocketClientError < StandardError; end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module PolygonClient
3
+ module Polygonio
4
4
  module Websocket
5
5
  class WebsocketEvent < Dry::Struct
6
6
  Statuses = Types::String.enum("connected", "successful", "auth_timeout", "auth_success", "success")
File without changes
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "polygon_client/version"
3
+ require "polygonio/version"
4
4
 
5
5
  require "eventmachine"
6
6
  require "faraday"
@@ -11,6 +11,6 @@ require "dry-types"
11
11
  require "permessage_deflate"
12
12
  require "websocket/driver"
13
13
 
14
- require "polygon_client/types"
15
- require "polygon_client/rest"
16
- require "polygon_client/websocket"
14
+ require "polygonio/types"
15
+ require "polygonio/rest"
16
+ require "polygonio/websocket"
@@ -2,11 +2,11 @@
2
2
 
3
3
  lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "polygon_client/version"
5
+ require "polygonio/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "polygonio"
9
- spec.version = PolygonClient::VERSION
9
+ spec.version = Polygonio::VERSION
10
10
  spec.authors = ["Lance Carlson"]
11
11
  spec.email = ["lancecarlson@gmail.com"]
12
12
 
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.metadata = {
19
19
  "homepage_uri" => "https://github.com/lancecarlson/polygon-client-rb",
20
- "source_code_uri" => 'https://github.com/lancecarlson/polygon-client-rb',
21
- "bug_tracker_uri" => 'https://github.com/lancecarlson/polygon-client-rb/issues'
20
+ "source_code_uri" => "https://github.com/lancecarlson/polygon-client-rb",
21
+ "bug_tracker_uri" => "https://github.com/lancecarlson/polygon-client-rb/issues"
22
22
  }
23
23
 
24
24
  # Specify which files should be added to the gem when it is released.
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.1.0
4
+ version: 0.2.1
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-01 00:00:00.000000000 Z
11
+ date: 2020-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -350,25 +350,25 @@ files:
350
350
  - README.md
351
351
  - Rakefile
352
352
  - bin/console
353
- - lib/polygon_client.rb
354
- - lib/polygon_client/rest.rb
355
- - lib/polygon_client/rest/api.rb
356
- - lib/polygon_client/rest/api/crypto.rb
357
- - lib/polygon_client/rest/api/forex.rb
358
- - lib/polygon_client/rest/api/reference/locales.rb
359
- - lib/polygon_client/rest/api/reference/markets.rb
360
- - lib/polygon_client/rest/api/reference/stocks.rb
361
- - lib/polygon_client/rest/api/reference/tickers.rb
362
- - lib/polygon_client/rest/api/stocks.rb
363
- - lib/polygon_client/rest/client.rb
364
- - lib/polygon_client/rest/errors.rb
365
- - lib/polygon_client/types.rb
366
- - lib/polygon_client/version.rb
367
- - lib/polygon_client/websocket.rb
368
- - lib/polygon_client/websocket/client.rb
369
- - lib/polygon_client/websocket/errors.rb
370
- - lib/polygon_client/websocket/events.rb
371
- - polygon_client.gemspec
353
+ - lib/polygonio.rb
354
+ - lib/polygonio/rest.rb
355
+ - lib/polygonio/rest/api.rb
356
+ - lib/polygonio/rest/api/crypto.rb
357
+ - lib/polygonio/rest/api/forex.rb
358
+ - lib/polygonio/rest/api/reference/locales.rb
359
+ - lib/polygonio/rest/api/reference/markets.rb
360
+ - lib/polygonio/rest/api/reference/stocks.rb
361
+ - lib/polygonio/rest/api/reference/tickers.rb
362
+ - lib/polygonio/rest/api/stocks.rb
363
+ - lib/polygonio/rest/client.rb
364
+ - lib/polygonio/rest/errors.rb
365
+ - lib/polygonio/types.rb
366
+ - lib/polygonio/version.rb
367
+ - lib/polygonio/websocket.rb
368
+ - lib/polygonio/websocket/client.rb
369
+ - lib/polygonio/websocket/errors.rb
370
+ - lib/polygonio/websocket/events.rb
371
+ - polygonio.gemspec
372
372
  homepage:
373
373
  licenses:
374
374
  - MIT
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module PolygonClient
4
- VERSION = "0.1.0"
5
- end