25 lines
1.1 KiB
Kotlin
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package ru.vendetti.bitcoin_summarizer
import com.google.gson.annotations.SerializedName
// Обёртка для данных (тут json-массив с одним элементом, поэтому выглядит так)
typealias TickerResponse = List<TickerData>
// Сами данные
data class TickerData(
val id: String,
val name: String,
val symbol: String,
val rank: String,
@SerializedName("price_usd") val priceUsd: String,
@SerializedName("price_btc") val priceBtc: String,
@SerializedName("24h_volume_usd") val volume24hUsd: String,
@SerializedName("market_cap_usd") val marketCapUsd: String,
@SerializedName("available_supply") val availableSupply: String,
@SerializedName("total_supply") val totalSupply: String,
@SerializedName("max_supply") val maxSupply: String?,
@SerializedName("percent_change_1h") val percentChange1h: String,
@SerializedName("percent_change_24h") val percentChange24h: String,
@SerializedName("percent_change_7d") val percentChange7d: String,
@SerializedName("last_updated") val lastUpdated: String
)