radiator 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -19
- data/lib/radiator/api.rb +6 -0
- data/lib/radiator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f9903d1a4e0c654af377fcc0a353e0079e631d5
|
4
|
+
data.tar.gz: b92e18fe56c4a13d0af9d0bae369e9e9a7dbb075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acfad80288e67f8662e6fdadcbf92be26963dd588c77a16419a40a38b940ef21258d4536d5aac2ef014af8fb3eb5851430d7e56f4d858c4b60489aeca7a628bb
|
7
|
+
data.tar.gz: efe041ba627bf96aa77c0ea32c13603e07b4183cabd81e1b3808dfad4bf84776bfe2fd5fb94b99d43790d6eb80aa22b72805e6b5d649cc893d0053dd3ca795ff
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -140,7 +140,7 @@ api = Radiator::Api.new
|
|
140
140
|
api.get_dynamic_global_properties do |properties|
|
141
141
|
properties.virtual_supply
|
142
142
|
end
|
143
|
-
=> "
|
143
|
+
=> "271342874.337 STEEM"
|
144
144
|
```
|
145
145
|
|
146
146
|
... or ...
|
@@ -151,14 +151,14 @@ require 'radiator'
|
|
151
151
|
api = Radiator::Api.new
|
152
152
|
response = api.get_dynamic_global_properties
|
153
153
|
response.result.virtual_supply
|
154
|
-
=> "
|
154
|
+
=> "271342874.337 STEEM"
|
155
155
|
```
|
156
156
|
|
157
157
|
#### Follower API
|
158
158
|
|
159
159
|
```ruby
|
160
160
|
api = Radiator::FollowApi.new
|
161
|
-
api.get_followers('inertia', 0, 'blog', 100) do |followers|
|
161
|
+
api.get_followers(account: 'inertia', start: 0, type: 'blog', limit: 100) do |followers|
|
162
162
|
followers.map(&:follower)
|
163
163
|
end
|
164
164
|
=> ["a11at",
|
@@ -457,22 +457,6 @@ There is another rare scenario involving `::Transaction` broadcasts that's handl
|
|
457
457
|
tx = Radiator::Transaction.new(wif: wif, recover_transactions_on_error: false)
|
458
458
|
```
|
459
459
|
|
460
|
-
### Golos Failover Examples
|
461
|
-
|
462
|
-
Typically, you only need to pass `chain: :golos` to enable Golos. Failover is enabled by default. If you want to provide your own full nodes, use this format:
|
463
|
-
|
464
|
-
```ruby
|
465
|
-
options = {
|
466
|
-
chain: :golos,
|
467
|
-
url: 'https://ws.golos.io',
|
468
|
-
failover_urls: [
|
469
|
-
'https://api.golos.cf'
|
470
|
-
]
|
471
|
-
}
|
472
|
-
|
473
|
-
api = Radiator::Api.new(options)
|
474
|
-
```
|
475
|
-
|
476
460
|
## Debugging
|
477
461
|
|
478
462
|
To enable debugging, set environment `LOG=DEBUG` before launching your app. E.g.:
|
data/lib/radiator/api.rb
CHANGED
@@ -837,6 +837,12 @@ module Radiator
|
|
837
837
|
end
|
838
838
|
end
|
839
839
|
|
840
|
+
def check_file_open?
|
841
|
+
File.exists?('.')
|
842
|
+
rescue
|
843
|
+
false
|
844
|
+
end
|
845
|
+
|
840
846
|
def debug_payload(request, response)
|
841
847
|
request = JSON.pretty_generate(request)
|
842
848
|
response = JSON.parse(response) rescue response
|
data/lib/radiator/version.rb
CHANGED