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
|
||||
print(btc.amount)
|
||||
println(btc.amount)
|
||||
|
||||
val eth = marketPrice("ETH", "EUR") // Ethereum in Euros
|
||||
println(eth.amount)
|
||||
|
|
|
@ -108,8 +108,11 @@ open class CryptoPrice(val base: String, val currency: String, val amount: Doubl
|
|||
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val price = marketPrice("BTC")
|
||||
println("BTC: ${price.amount}")
|
||||
listOf("BTC", "BCH", "BSV", "ETH","ETH2","ETC").forEach {
|
||||
with(marketPrice(it)) {
|
||||
println("$base: $amount")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue