【发布时间】:2021-09-26 00:33:49
【问题描述】:
您好,我正在尝试根据当前位置找出如何更改城市。有没有办法可以操纵“{city}”?这可能是一个非常简单的问题。截至目前,我的应用程序知道设备位置,但我不知道如何操作 url。我应该使用不同的 API 吗?
interface ApiService {
@GET("weather/{city}")
suspend fun getWeather():Response<Weather>
}
【问题讨论】:
标签: kotlin geolocation retrofit rest weather-api