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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb4df3a5bca6acee44250193ee69d9b0efeaa7625a2f725b7983f5af035e064a
4
- data.tar.gz: 7387fbd1ae46338c5437c28495b74805ac43f132d8bae7860bb9933eb1d25e7a
3
+ metadata.gz: 161718a11cc962c92f207bc39e2c96f1c57b57a23ef8739b8a93de60ffbb7af5
4
+ data.tar.gz: 614c5521668d1c46a75820d73f1039dff27526938ac6c43ac5546bf1952c698d
5
5
  SHA512:
6
- metadata.gz: a2cb18c22c75464048bb61afa5d89c7560980632d24a66e41845fefcb59c226622b9c7124e2a72447aeab4fb60b663d695425e59e2e9e0f88608de8e3c2f9d45
7
- data.tar.gz: 1005391cd894adadb1f9c6709ee63bcd4f2095457b2bfad89acc50266ab9c373d2574fcd68ff14f5a412ab83b269425a64940d45c1cd07c69254fbac2350973e
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CryptoPriceFinder
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
5
  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.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-03 00:00:00.000000000 Z
11
+ date: 2025-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty