Static Method Summary
Static Public Methods | ||
public static |
fromIndexJSON(JSON: Object): User Unwraps from serach Index JSON object |
|
public static |
Unwraps a user from an API JSON object. |
Constructor Summary
Public Constructor | ||
public |
constructor(id: number, name: string, options: Object) Creates an instance of a user locally. |
Member Summary
Public Members | ||
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
If current user is following this one |
|
public set |
If current user is following this one |
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
If user wants notifications |
|
public set |
If current user is following this one |
Method Summary
Public Methods | ||
public |
Gets the schema |
|
public |
Check if is current user |
|
public |
Converts to json |
Static Public Methods
Public Constructors
public constructor(id: number, name: string, options: Object) source
Creates an instance of a user locally.
Params:
Name | Type | Attribute | Description |
id | number | Integer uniquely id'ing user. |
|
name | string | user display name |
|
options | Object | other options |
|
options.avatar | string |
|
avatar URL |
options.isFollowing | boolean | If current user is following |
|
options.isAdmin | boolean | If user is admin |
|
options.receiveNotifications | boolean | If user wants notifications |