CryptoPriceFinder 0.4.0 → 0.6.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 +4 -4
- data/lib/CryptoPriceFinder/crypto.rb +38 -1
- data/lib/CryptoPriceFinder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 161718a11cc962c92f207bc39e2c96f1c57b57a23ef8739b8a93de60ffbb7af5
|
4
|
+
data.tar.gz: 614c5521668d1c46a75820d73f1039dff27526938ac6c43ac5546bf1952c698d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f8e99b7d01042c091a3309c1ac7b079bae45aa77bd207f7a8997b0c44ff6e8a312bf1b216c6a261f11fab240e855578c547d932c5b2ca46bdfbde16c91e08d3
|
7
|
+
data.tar.gz: d9e77ac2c86901aa1d18e8cb752d4107845d9c4b24b1aa46e12e3425de54787c9eabed8e71169a5a63c1dd2c46a8828628747c77152c90b6cdfc77504c9e065e
|
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'httparty'
|
3
|
-
|
3
|
+
class String
|
4
|
+
def comma
|
5
|
+
self.to_s.reverse.scan(/(?:\d*\.)?\d{1,3}-?/).join(',').reverse
|
6
|
+
end
|
7
|
+
end
|
4
8
|
module CryptoPriceFinder
|
5
9
|
class << self
|
6
10
|
URL = "https://duckduckgo.com/js/spice/cryptocurrency/"
|
@@ -76,5 +80,38 @@ module CryptoPriceFinder
|
|
76
80
|
def ravencoin(amount)
|
77
81
|
http("rvn", "usd", amount)
|
78
82
|
end
|
83
|
+
def usdc(amount)
|
84
|
+
http("usdc", "usd", amount)
|
85
|
+
end
|
86
|
+
def cardano(amount)
|
87
|
+
http("ada", "usd", amount)
|
88
|
+
end
|
89
|
+
def sui(amount)
|
90
|
+
http("sui", "usd", amount)
|
91
|
+
end
|
92
|
+
def uniswap(amount)
|
93
|
+
http("uni", "usd", amount)
|
94
|
+
end
|
95
|
+
def fantom(amount)
|
96
|
+
http("ftm", "usd", amount)
|
97
|
+
end
|
98
|
+
def fartcoin(amount)
|
99
|
+
http("fartcoin", "usd", amount)
|
100
|
+
end
|
101
|
+
def neo(amount)
|
102
|
+
http("neo", "usd", amount)
|
103
|
+
end
|
104
|
+
def ftx_token(amount)
|
105
|
+
http("ftt", "usd", amount)
|
106
|
+
end
|
107
|
+
def flow(amount)
|
108
|
+
http("flow", "usd", amount)
|
109
|
+
end
|
110
|
+
def worldcoin(amount)
|
111
|
+
http("wld", "usd", amount)
|
112
|
+
end
|
113
|
+
def vechain(amount)
|
114
|
+
http("vet", "usd", amount)
|
115
|
+
end
|
79
116
|
end
|
80
117
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CryptoPriceFinder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael-Meade
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|