binance_client 1.2.0 → 1.3.0

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: 65dba4f920f7c9e017d74cee2c972ae54af6f731faa17c6eb15c9602061e0bb7
4
- data.tar.gz: 0aa2e07fac3321d91513d0ab3904e80f09351b538507d7b915cf20145166f13f
3
+ metadata.gz: 52c8b1596a4976bc9b6e2743fad40d6e33d050f6a614bcb550128ce29bb97d00
4
+ data.tar.gz: 2cb12b4ad491d438303a745e357793f4c2d9df97d66c05fd59226f2649e7b492
5
5
  SHA512:
6
- metadata.gz: e72bc48d33af094253cbbe395f9bf8f6d67343a7bcc8cf912e69740e4733c4161f7a1d06fc4755f1ff236f214b8026c1f896b360b99204e9338b18c02e95b906
7
- data.tar.gz: 43f1d01d8a1ac0ab5fd540f13933e4d5cd17d34f063ab1dc924372a0a94e74599c4672fbeb411e6378c97f86182eb61a46a8ee3285c1838f98ce11d17b3706cd
6
+ metadata.gz: cd519eeaff647220d99d6abea75054cc1eae2fd2dea9f6733d44afb4c40977957aeb74e8720bda35f5d159fff28d4092a0bb1c6fcddc3995bdc8bb84d5a4ccda
7
+ data.tar.gz: 0d4570d268372084d100619469064d6ae5f364e63b99d6c0063f6bb4b68f1b6dad84a94bccd15d1308361a7bfe72371791e2a27f5f3a97465217f200f076a931
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.3.0] - 2021-11-29
8
+ ### Added
9
+ - Add proxy support
10
+
7
11
  ## [1.2.0] - 2021-11-26
8
12
  ### Added
9
13
  - Allow easy access to the `used_weight` header in a response by calling `#used_weight(interval)`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- binance_client (1.2.0)
4
+ binance_client (1.3.0)
5
5
  activesupport
6
6
  api_client_base (~> 1.11)
7
7
  typhoeus
data/README.md CHANGED
@@ -46,15 +46,15 @@ The default representation of response data is a JSON hash
46
46
  You can set a hook to do application-specific things per request. This is useful when monitoring the rate limits:
47
47
 
48
48
  ```ruby
49
- BinanceClient.after_request = DoSomethingAfterBinanceRequest
49
+ BinanceClient.configuration.after_response = DoSomethingAfterBinanceResponse
50
50
  ```
51
51
 
52
52
  What you assign can be a proc -- it just needs to respond to `call` and accept the `BinanceClient` response object:
53
53
 
54
54
  ```ruby
55
- class DoSomethingAfterBinanceRequest
55
+ class DoSomethingAfterBinanceResponse
56
56
 
57
- def self.call(response)
57
+ def self.call(request, response)
58
58
  one_minute_weight = response.used_weight("1m")
59
59
  if one_minute_weight > 1200
60
60
  Rails.logger.info "Looks like we've hit the request limit!"
@@ -12,11 +12,12 @@ module BinanceClient
12
12
  attribute :host
13
13
  attribute :api_key
14
14
  attribute :api_secret
15
+ attribute :proxy
15
16
 
16
17
  private
17
18
 
18
19
  def default_opts
19
- {host: host, api_key: api_key, api_secret: api_secret}
20
+ {host: host, api_key: api_key, api_secret: api_secret, proxy: proxy}
20
21
  end
21
22
  end
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module BinanceClient
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -39,5 +39,6 @@ module BinanceClient
39
39
  has :host, classes: String, default: DEFAULT_HOST
40
40
  has :api_key, classes: String
41
41
  has :api_secret, classes: String
42
+ has :proxy
42
43
  end
43
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binance_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AJ Villalobos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-26 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_client_base