wazirx 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wazirx/client/websocket.rb +6 -1
- data/lib/wazirx/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f3fe59a49d2c88b73a3a7141e5bd5c3c2ee989d1f0e9fc506c957c7186a4272
|
4
|
+
data.tar.gz: aa28a281b05f1323dae86fccec3b75522d569c6ae998b72116b047c00fe4ecb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0783a976b70d1672d4c20a87b5e5fbee6bf7869e5cdd8e8682ddca597cf3568ca18dfec34fe07f9d417536afe349841f4c9809f9ae34d31c8c35e35f547a25
|
7
|
+
data.tar.gz: 5048809c05a59bbcc7b50e3375fae64f5e1ba490e87cc15bb5e6092ddac6cc9bf7e62969c516f3f6d7ed421415f68417378bf6c0f11241ca53b52878dc42878b
|
@@ -73,12 +73,16 @@ module Wazirx
|
|
73
73
|
@ws.send(JSON.dump({'event':'unsubscribe', 'streams':streams.flatten,'id':id}))
|
74
74
|
end
|
75
75
|
|
76
|
-
def create_stream(streams: streams, id: id, action: action, auth_key:'')
|
76
|
+
def create_stream(streams: streams, id: id, action: action, methods: methods, auth_key:'')
|
77
77
|
@ws = Faye::WebSocket::Client.new(BASE_URL)
|
78
78
|
@ws.on :open do |event|
|
79
79
|
puts [:open]
|
80
80
|
if action == SUBSCRIBE
|
81
81
|
puts subscribeEvent(streams, id, auth_key)
|
82
|
+
EM.add_periodic_timer 300 do
|
83
|
+
@ws.ping BASE_URL
|
84
|
+
puts [:message, 'pinged every 5 minutes']
|
85
|
+
end
|
82
86
|
else
|
83
87
|
puts unsubscribeEvent(streams, id, auth_key)
|
84
88
|
end
|
@@ -86,6 +90,7 @@ module Wazirx
|
|
86
90
|
|
87
91
|
@ws.on :message do |event|
|
88
92
|
puts [:message, JSON.load(event.data)]
|
93
|
+
methods[:message].call(event)
|
89
94
|
end
|
90
95
|
|
91
96
|
@ws.on :close do |event|
|
data/lib/wazirx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wazirx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dibyajit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.0.
|
134
|
+
rubygems_version: 3.0.3.1
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: API Wrapper for the Wazirx cryptocurrency exchange.
|