2023-04-04 22:39:18 +07:00

27 lines
593 B
Kotlin

package ru.myitschool.lab23
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
class MainViewModel : ViewModel() {
val usdRate = MutableLiveData<String>()
val rateCheckInteractor = RateCheckInteractor()
fun onCreate() {
refreshRate()
}
fun onRefreshClicked() {
refreshRate()
}
private fun refreshRate() {
TODO("refresh rate is not implemented")
}
companion object {
const val TAG = "MainViewModel"
const val USD_RATE_URL = "https://www.freeforexapi.com/api/live?pairs=USDRUB"
}
}