26.06 26.05 25.12
26.06 26.05 25.12 Russian English

UserApi. Android

Api to get user information, change it's password and logout from the app.

Get user

Get current user info.

If request was successful you'll get VMSUser object.

@GET(USER_SELF)
suspend fun getUser(): VMSUser

Change password

Change password of current authorized user.

If request was successful you'll get ResponseBody.

@PUT(USER_SELF)
suspend fun savePassword(@Body group: VMSChangePasswordRequest): ResponseBody

VMSChangePasswordRequest

Object with needed info to change password.

password and password_confirmation should match, current_password is your old password.

Logout

Logout current authorized user.

If request was successful you'll get ResponseBody.

@POST(LOGOUT)
suspend fun logout(): ResponseBody