Cleanup.
This commit is contained in:
parent
358b8b4582
commit
fec26fffd7
2 changed files with 6 additions and 3 deletions
|
@ -14,7 +14,7 @@ import net.thauvin.erik.crypto.CryptoPrice
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
val btc = marketPrice("BTC") // Bitcoin
|
val btc = marketPrice("BTC") // Bitcoin
|
||||||
print(btc.amount)
|
println(btc.amount)
|
||||||
|
|
||||||
val eth = marketPrice("ETH", "EUR") // Ethereum in Euros
|
val eth = marketPrice("ETH", "EUR") // Ethereum in Euros
|
||||||
println(eth.amount)
|
println(eth.amount)
|
||||||
|
|
|
@ -108,8 +108,11 @@ open class CryptoPrice(val base: String, val currency: String, val amount: Doubl
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
val price = marketPrice("BTC")
|
listOf("BTC", "BCH", "BSV", "ETH","ETH2","ETC").forEach {
|
||||||
println("BTC: ${price.amount}")
|
with(marketPrice(it)) {
|
||||||
|
println("$base: $amount")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue