Cleanup
This commit is contained in:
parent
740e3a9d01
commit
b4e37a5877
4 changed files with 9 additions and 4 deletions
|
@ -32,7 +32,7 @@
|
|||
|
||||
package net.thauvin.erik.crypto
|
||||
|
||||
@Suppress("EmptySecondaryConstructor", "unused")
|
||||
@Suppress("unused")
|
||||
class CryptoException : Exception {
|
||||
var statusCode = NO_STATUS
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ open class CryptoPrice(val base: String, val currency: String, val amount: Doubl
|
|||
if (json.has("data")) {
|
||||
with(json.getJSONObject("data")) {
|
||||
return CryptoPrice(
|
||||
getString("base"), getString("currency"), getString("amount").toDouble()
|
||||
getString("base"), getString("currency"), getString("amount").toDouble()
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
@ -108,7 +108,7 @@ open class CryptoPrice(val base: String, val currency: String, val amount: Doubl
|
|||
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
listOf("BTC", "BCH", "BSV", "ETH","ETH2","ETC").forEach {
|
||||
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