Polyjuice Client v0.4.2 Polyjuice.Client.Profile View Source
Profile-related functions.
Link to this section Summary
Functions
Get avatar url for the user.
Get display name for the user.
Get user profile.
Modify avatar url for the user.
Modify display name for the user.
Link to this section Functions
get_avatar_url(client_api, user_id \\ nil)
View Sourceget_avatar_url( client_api :: Polyjuice.Client.API.t(), user_id :: String.t() | nil ) :: {:ok, String.t()} | any()
Get avatar url for the user.
user_id
is the ID of user whose profile should be retrieved. If
user_id
is ommited it defaults to the user_id represented by the client.
get_displayname(client_api, user_id \\ nil)
View Sourceget_displayname( client_api :: Polyjuice.Client.API.t(), user_id :: String.t() | nil ) :: {:ok, String.t()} | any()
Get display name for the user.
user_id
is the ID of the user whose profile should be retrieved. If
user_id
is ommited it defaults to the user_id represented by the client.
get_profile(client_api, user_id \\ nil)
View Sourceget_profile(client_api :: Polyjuice.Client.API.t(), user_id :: String.t() | nil) :: {:ok, map()} | any()
Get user profile.
user_id
is the ID of the user whose profile should be retrieved. If
user_id
is ommited it defaults to the user_id represented by the client.
put_avatar_url(client_api, user_id \\ nil, avatar_url)
View Sourceput_avatar_url( client_api :: Polyjuice.Client.API.t(), user_id :: String.t() | nil, avatar_url :: String.t() ) :: :ok | any()
Modify avatar url for the user.
user_id
is the ID of the user whose profile should be retrieved. If
user_id
is ommited it defaults to the user_id represented by the client.
avatar_url
is an mxc:
URL specifying the location of the new profile
avatar.
put_displayname(client_api, user_id \\ nil, displayname)
View Sourceput_displayname( client_api :: Polyjuice.Client.API.t(), user_id :: String.t() | nil, displayname :: String.t() ) :: :ok | any()
Modify display name for the user.
user_id
is the ID of the user whose profile should be retrieved. If
user_id
is ommited it defaults to the user_id represented by the client.
displayname
is the new displayname.