Hello, everybody, I've a question. I need that get...
# android
h
Hello, everybody, I've a question. I need that getUser() receives argument only from an EditText's value.  How can I do it? Using SharedPreferences?  Thanks in advance.
Copy code
interface AuthApi : BaseApi {
    @FormUrlEncoded
    @PUT("{PartnerId}/api/Main/LoginClient")
    suspend fun login(
        @Field("email") email: String,
        @Path("PartnerId") partnerId:String,
    ): LoginResponse
}
interface UserApi : BaseApi{
    @GET("{PartnerId}/api/Main/LoginClient")
    suspend fun getUser(@Path("PartnerId")partnerId:Int): LoginResponse
}
Copy code
class UserRepository @Inject constructor(
    private val api: UserApi
) : BaseRepository(api) {
    suspend fun getUser() = safeApiCall { api.getUser(0) }    <---getUser()'s argument must be  EditText's value
}
😶 4
🧵 1
c
Please stop posting your software development questions in this channel. The whole workspace is related to Kotlin programming language.