android10 / android10/Android-CleanArchitecture-Kotlin
Declare @Body data class in Api internal interface
- 主要語言
- Kotlin
- 星號
- 4.8k
- 分支
- 929
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I want to make a data class in order to send data via post...but internal declaration of Api interface not allows me to archieve this. If I remove internal declaration, it works, but Repository class shouldn't have to fill an ApiParams class.....
```
internal interface LoginApi {
companion object {
private const val LOGIN = "login"
private const val PARAM_ACCOUNT = "account"
private const val PARAM_EMAIL = "email"
private const val PARAM_PASSWORD = "password"
}
@POST(LOGIN) fun login(@Body params: LoginParams): Call
data class LoginParams(
@SerializedName(PARAM_ACCOUNT) private val account: String,
@SerializedName(PARAM_EMAIL) private val email: String,
@SerializedName(PARAM_PASSWORD) private val password: String
)
}
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。