Constructor
# new User(dataopt)
Create a user from a JSON object
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
data |
object
|
<optional> |
{} | The user data |
Properties:
Classes
Methods
# setAvatar(avatar) → {void}
Set the avatar of a user
Parameters:
| Name | Type | Description |
|---|---|---|
avatar |
string
|
The avatar base64 string |
void
# setData(data) → {void}
Set the user data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object
|
The user data |
void
# setFromJSON(user) → {void}
Set the user from a JSON object
Parameters:
| Name | Type | Description |
|---|---|---|
user |
object
|
The JSON object |
void