bitsharesws 0.0.1 → 0.0.2
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 +4 -4
- data/README.md +41 -8
- data/bitsharesws.gemspec +2 -2
- data/lib/bitshares/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 829712effb1a8377f67e04ed8c9b0ca34b984d35
|
4
|
+
data.tar.gz: c8a32c847874e1a19ffeda1f7886d8715734bbe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8fbfbca60943cfb3efa699bd0054d92c4f42401d9eb91ec50e7b52e838f4a7a652f92cf6728c3b2f47e6194a8b343f43c9b70623c607afd53f865c22e88ac10
|
7
|
+
data.tar.gz: 2a686fe6dbec3197d1de23d5d785b9cdd60fb3c449cb6da9086560569bc4ea275255da85db5449c2da75c6c4c1ee4a8fb8bee92834063d03203a2ed2e798a258
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Bitsharesws
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem is websocket client for Decentralize Exchange BitShares. Now gem can get public information from Database API.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,17 +20,52 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
`BitShares` is main class. Require it:
|
26
24
|
|
27
|
-
|
25
|
+
```ruby
|
26
|
+
require 'bitshares'
|
27
|
+
```
|
28
|
+
|
29
|
+
Becouse BitShares is decentralize exchange, before you use it, you need set node (for example openledger):
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
BitShares.config do
|
33
|
+
node 'wss://bitshares.openledger.info/ws'
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
This command try connect to this node. If you don't want connect now, use this:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
BitShares.config false do
|
41
|
+
node 'wss://bitshares.openledger.info/ws'
|
42
|
+
end
|
43
|
+
|
44
|
+
# some else code
|
45
|
+
|
46
|
+
BitShares.start # now try to connect
|
47
|
+
```
|
48
|
+
|
49
|
+
If you want to set username and password:
|
28
50
|
|
29
|
-
|
51
|
+
```ruby
|
52
|
+
BitShares.config do
|
53
|
+
node 'wss://bitshares.openledger.info/ws'
|
54
|
+
login 'mylogin'
|
55
|
+
pass 'mypass'
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
If you want to get account use `BitShares.account 'some-account-name'`.
|
60
|
+
If you want to know balance some account use `BitShares.balance 'some-account-name'`.
|
61
|
+
|
62
|
+
## Development
|
30
63
|
|
31
|
-
|
64
|
+
Now gem have only Database API. In future version, I want add all public and wallet API.
|
32
65
|
|
33
66
|
## Contributing
|
34
67
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
68
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/scientistnik/bitsharesws.
|
36
69
|
|
37
70
|
## License
|
38
71
|
|
data/bitsharesws.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_runtime_dependency 'json'
|
25
|
-
spec.add_runtime_dependency 'websocket-eventmachine-client'
|
24
|
+
spec.add_runtime_dependency 'json', '~> 0'
|
25
|
+
spec.add_runtime_dependency 'websocket-eventmachine-client', '~> 0'
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 1.15"
|
28
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/bitshares/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitsharesws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scientistnik
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: websocket-eventmachine-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|