Polyjuice Client v0.2.3 Polyjuice.Client.User View Source

User-related functions.

Link to this section Summary

Link to this section Functions

Link to this function

log_in_with_password(client_or_url, identifier, password, opts \\ [])

View Source
log_in_with_password(
  client_or_url :: Polyjuice.Client.API.t() | String.t(),
  identifier :: String.t() | tuple() | map(),
  password :: String.t(),
  opts :: list()
) :: {:ok, map()} | Any

Log in with a password.

client_or_url may be either something that implements Polyjuice.Client.API or a homeserver base URL.

identifier may be a single string (in which case it represents a username -- either just the localpart or the full MXID), a tuple of the form {:email, "email@address"}, a tuple of the form {:phone, "country_code", "phone_number"}, or a map that is passed directly to the login endpoint.

opts is a keyword list of options:

  • device_id: (string) the device ID to use
  • initial_device_display_name: (string) the display name to use for the device
Link to this function

log_out(client_api)

View Source
log_out(client_api :: Polyjuice.Client.API.t()) :: {:ok} | Any

Log out an existing session.