cryptocoin_fanboi 0.7.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -3
- data.tar.gz.sig +0 -0
- data/lib/cryptocoin_fanboi.rb +39 -4
- metadata +42 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3400a8bf63d6a0c2a0e674a9069fbec9491e80a35fa2cfb34a824b3ed1131c16
|
4
|
+
data.tar.gz: '0774791ece51f01337d21a450f8d3fcd429c79ae83e6deb8de29895178fc80bb'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7fe5b7b48d7549f1d49ac12957e219eecbcfd796d5b2dd56eb5e595baee22564f7ff037802504ca83e07bd7059a234ea3577896d7ba0b3908eb3a2b6fd40d67
|
7
|
+
data.tar.gz: '04285d10aade28ac593a0758031622023c22032f6b8b83382071555b81373b24aa389d36264727ea8c9928eaf3271fded1a087cf6fa9779d9889096b31c98da3'
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
�
|
2
|
-
s
|
3
|
-
|
1
|
+
x�ʺ�()��ź���&b������;!TC�5ʊf���g [����h=w��"v��eP
|
2
|
+
sf�s�!��5d�$�A8����*b��㬒��hau4{��v�F�Ca�͔x��zMG�!Ӆ~d����֍'�V,%��Lo��6��[�h2�n����b�����9 �u�
|
3
|
+
�q��z��h�UƧuޱ���7��$F�=q�ڱ�J 5H�)����; �Nd:���v�`�����
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/cryptocoin_fanboi.rb
CHANGED
@@ -3,15 +3,18 @@
|
|
3
3
|
# file: cryptocoin_fanboi.rb
|
4
4
|
|
5
5
|
|
6
|
+
require 'excon'
|
6
7
|
require 'psych'
|
7
8
|
require 'colored'
|
8
|
-
require '
|
9
|
+
require 'coinmarketcap_lite'
|
9
10
|
require 'table-formatter'
|
10
11
|
require 'rxfhelper'
|
11
12
|
require 'rexle'
|
12
13
|
require 'kramdown'
|
13
14
|
require 'justexchangerates'
|
14
15
|
require 'coinquery'
|
16
|
+
require 'coin360api21'
|
17
|
+
require 'remote_dwsregistry'
|
15
18
|
|
16
19
|
# 02-May 2021 ----
|
17
20
|
#
|
@@ -83,7 +86,7 @@ class CryptocoinFanboi
|
|
83
86
|
|
84
87
|
@colored, @debug, @filepath = colored, debug, filepath
|
85
88
|
@exchangerate_key, @cmc_apikey = exchangerate_key, cmc_apikey
|
86
|
-
|
89
|
+
puts 'before coinquery'
|
87
90
|
@cq = CoinQuery.new(dym: false, timeout: 7, debug: debug)
|
88
91
|
|
89
92
|
@watch= watch.map(&:upcase)
|
@@ -387,6 +390,13 @@ class CryptocoinFanboi
|
|
387
390
|
alias last_day today
|
388
391
|
alias day today
|
389
392
|
|
393
|
+
def total_market_cap()
|
394
|
+
|
395
|
+
'$' + Coin360Api21::Global.new.latest.total_market_cap.round.to_s\
|
396
|
+
.reverse.gsub(/...(?=.)/,'\&,').reverse
|
397
|
+
|
398
|
+
end
|
399
|
+
|
390
400
|
def to_html()
|
391
401
|
|
392
402
|
xpath = (5..8).map {|x| 'tbody/tr/td[' + x.to_s + ']' }.join(' | ')
|
@@ -487,8 +497,8 @@ class CryptocoinFanboi
|
|
487
497
|
|
488
498
|
def fetch_coinlist(limit: nil)
|
489
499
|
|
490
|
-
body = CoinmarketcapLite.new(apikey: @cmc_apikey).coins
|
491
|
-
@all_coins =
|
500
|
+
body = CoinmarketcapLite.new(apikey: @cmc_apikey).coins
|
501
|
+
@all_coins = body['data']\
|
492
502
|
.map {|x| OpenStruct.new x}
|
493
503
|
|
494
504
|
if @watch.any? then
|
@@ -577,6 +587,31 @@ class CryptocoinFanboi
|
|
577
587
|
|
578
588
|
end
|
579
589
|
|
590
|
+
class CryptocoinFanboiPlus < CryptocoinFanboi
|
591
|
+
|
592
|
+
def initialize(regx, watch: [], ignore: [], colored: true, debug: false,
|
593
|
+
filepath: '.')
|
594
|
+
|
595
|
+
reg = if regx.is_a? String then
|
596
|
+
RemoteDwsRegistry.new domain: regx
|
597
|
+
else
|
598
|
+
regx
|
599
|
+
end
|
600
|
+
|
601
|
+
exchangerate_key = JustExchangeRatesPlus.fetch_app_id(reg)
|
602
|
+
puts 'exchangerate_key:' + exchangerate_key.inspect if debug
|
603
|
+
|
604
|
+
cmc_apikey = CoinmarketcapLitePlus.fetch_apikey(reg)
|
605
|
+
puts 'cmc_apikey: ' + cmc_apikey.inspect if debug
|
606
|
+
|
607
|
+
super(watch: watch, ignore: ignore, colored: colored, debug: debug,
|
608
|
+
filepath: filepath, exchangerate_key: exchangerate_key,
|
609
|
+
cmc_apikey: cmc_apikey)
|
610
|
+
|
611
|
+
end
|
612
|
+
|
613
|
+
end
|
614
|
+
|
580
615
|
|
581
616
|
|
582
617
|
if __FILE__ == $0 then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptocoin_fanboi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
8apOj5Vc5mSZcvmZkImt0L0+RfWgzVjyK6LWXmWC0fkURO1c8pu+DEn2QI5HEKpD
|
36
36
|
zda3SGyo8CEr8HOwCV4H0aAY
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2021-05-
|
38
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: colored
|
@@ -157,6 +157,46 @@ dependencies:
|
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0.2'
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: coin360api21
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.2.0
|
167
|
+
- - "~>"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0.2'
|
170
|
+
type: :runtime
|
171
|
+
prerelease: false
|
172
|
+
version_requirements: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: 0.2.0
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0.2'
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: remote_dwsregistry
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - "~>"
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0.4'
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: 0.4.1
|
190
|
+
type: :runtime
|
191
|
+
prerelease: false
|
192
|
+
version_requirements: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - "~>"
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0.4'
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: 0.4.1
|
160
200
|
description:
|
161
201
|
email: digital.robertson@gmail.com
|
162
202
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|