class WeatherForecastRepository @Inject constructor() { suspend fun fetchWeatherForecast(): Result<Int> { // Since you can only return one value from suspend function // you have to set data loading before calling fetchWeatherForecast // Fake api call delay(1000) // Return fake success data return Result.Success((0..20).random()) } }