Enables scripted content fragments to use UserPresences
Methods
Get
OBSOLETE. Gets a user's online status. This is replaced with the 'Presence' property on Users from 'core_v2_user.Get()'
Velocity
#set($onlineUserResponse = $core_v2_userPresence.Get("%{ UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var onlineUserResponse = core_v2_userPresence.Get({ UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
UserId | Int32 | Either UserId or Username is required. | Optional | ||
Username | String | Either UserId or Username is required. | Optional |
Returns
List
List Overload 1
OBSOLETE. Lists online users. This is replaced with passing 'Presence: true' to 'core_v2_user.List()'
Velocity
#set($pagedListResponse = $core_v2_userPresence.List())
JavaScript
var pagedListResponse = core_v2_userPresence.List();
List Overload 2
OBSOLETE. Lists online users. This is replaced with passing 'Presence: true' to 'core_v2_user.List()'
Velocity
#set($pagedListResponse = $core_v2_userPresence.List("%{ Location = $locationArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var pagedListResponse = core_v2_userPresence.List({ Location: locationArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
Location | String | Location | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
UserId | Int32 | User Id | Optional | ||
Username | String | Username | Optional |
Returns
Update
OBSOLETE. Updates a user's online status. This is no longer supported as presence is managed automatically.
Velocity
#set($onlineUserResponse = $core_v2_userPresence.Update($isOnline, "%{ Location = $locationArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var onlineUserResponse = core_v2_userPresence.Update(isOnline, { Location: locationArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
isOnline | Boolean | Is Online | Required | ||
Location | String | Location | Optional | ||
UserId | Int32 | Either UserId or Username is required. | Optional | ||
Username | String | Either UserId or Username is required. | Optional |