UserApi. iOS
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. If any error would occur you would get an VMSApiError
object.
getUser(completion: (VMSUser?, VMSApiError?))
Change password
Change password of current authorized user.
If request was successful you'll get nil
. If any error would occur you would get an VMSApiError
object.
changePassword(info: VMSChangePasswordRequest, completion: ((VMSApiError?)))
VMSChangePasswordRequest
Object with needed info to change password.
new
and confirmNew
should match.
init(new: String, old: String, confirmNew: String)
Change language
Keep track of user changing language inside the app on server side.
If request was successful you'll get nil
. If any error would occur you would get an VMSApiError
object.
changeLanguage(language: VMSLanguage, completion: ((VMSApiError?)))
Logout
Logout current authorized user.
If request was successful you'll get nil
. If any error would occur you would get an VMSApiError
object.
logout(completion: (VMSApiError?))