Enables scripted content fragments to use Followers
Methods
Get
Gets a follower for a given user, useful for detecting if a user follows a user.
Velocity
#set($userResponse = $core_v2_follower.Get($userId, "%{ FollowerId = $followerIdArg, FollowerName = $followerNameArg }"))
JavaScript
var userResponse = core_v2_follower.Get(userId, { FollowerId: followerIdArg, FollowerName: followerNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | Followed user id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
FollowerId | Int32 | Id of following user. Either FollowerId or FollowerName are required. | Optional | ||
FollowerName | String | UserName of following user. Either FollowerId or FollowerName are required. | Optional |
Returns
List
Lists users following a given user
Velocity
#set($pagedListResponse = $core_v2_follower.List("%{ PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var pagedListResponse = core_v2_follower.List({ PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
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 | |
SortBy | String | Sort by | Optional | Username | CreatedDate, DisplayName |
SortOrder | String | Sort order | Optional | Ascending | Ascending, Descending |
UserId | Int32 | Id of user followed user. Either UserId or Username are required. | Optional | ||
Username | String | UserName of followed user. Either UserId or Username are required. | Optional |