login

suspend fun Umami.login(request: Login.Request): Login.Response

Logs in to the Umami API. After a successful login, the authentication token is stored and used for subsequent requests.

Return

The login response containing the token and user information.

Parameters

request

The login request containing the username and password.


suspend fun Umami.login(username: String, password: String): Login.Response

Logs in to the Umami API. After a successful login, the authentication token is stored and used for subsequent requests. This is a convenience function that creates a Login.Request object.

Return

The login response containing the token and user information.

Parameters

username

The username for authentication.

password

The password for authentication.