Enables scripted content fragments to use Followings
Methods
Create
Create Overload 1
Creates a new following relationship for the accessing user
Velocity
#set($followResponse = $core_v2_following.Create($followingId))
JavaScript
var followResponse = core_v2_following.Create(followingId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
followingId | Int32 | Id of user to follow | Required |
Create Overload 2
Creates a new following relationship
Velocity
#set($followResponse = $core_v2_following.Create($followingId, "%{ FollowerName = $followerNameArg, FollowingId = $followingIdArg }"))
JavaScript
var followResponse = core_v2_following.Create(followingId, { FollowerName: followerNameArg, FollowingId: followingIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
followingId | Int32 | Id of user to follow | Required | ||
options | Options | Set of optional parameters including: | Required | ||
FollowerName | String | Username of following user. Either FollowingId or FollowerName is required. | Optional | ||
FollowingId | Int32 | Id of following user. Either FollowingId or FollowerName is required. | Optional |
Returns
Delete
Deletes a following relationship between users.
Velocity
#set($additionalInfoResponse = $core_v2_following.Delete("%{ FollowerId = $followerIdArg, FollowerName = $followerNameArg, FollowingId = $followingIdArg, FollowingName = $followingNameArg }"))
JavaScript
var additionalInfoResponse = core_v2_following.Delete({ FollowerId: followerIdArg, FollowerName: followerNameArg, FollowingId: followingIdArg, FollowingName: followingNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FollowerId | Int32 | Id of user who is following. Either FollowerId or FollowerName is required. | Optional | ||
FollowerName | String | Username of user who is following. Either FollowerId or FollowerName is required. | Optional | ||
FollowingId | Int32 | Id of user who is followed. Either FollowingId or FollowingName is required. | Optional | ||
FollowingName | String | Username of user who is followed. Either FollowingId or FollowingName is required. | Optional |
Returns
Get
Gets a following relationship.
Velocity
#set($userResponse = $core_v2_following.Get($userId, "%{ FollowerName = $followerNameArg, FollowingId = $followingIdArg }"))
JavaScript
var userResponse = core_v2_following.Get(userId, { FollowerName: followerNameArg, FollowingId: followingIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | Id of user who is following | Required | ||
options | Options | Set of optional parameters including: | Required | ||
FollowerName | String | Username of the followed user. Either FollowingId or FollowerName is required. | Optional | ||
FollowingId | Int32 | Id of the followed user. Either FollowingId or FollowerName is required. | Optional |
Returns
IsFollowing
Velocity
#set($isFollowingResponseResponse = $core_v2_following.IsFollowing("%{ FollowerId = $followerIdArg, FollowerName = $followerNameArg, FollowingId = $followingIdArg, FollowingName = $followingNameArg }"))
JavaScript
var isFollowingResponseResponse = core_v2_following.IsFollowing({ FollowerId: followerIdArg, FollowerName: followerNameArg, FollowingId: followingIdArg, FollowingName: followingNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FollowerId | Int32 | Id of user who is following. Either FollowerId or FollowerName is required. | Optional | ||
FollowerName | String | Username of user who is following. Either FollowerId or FollowerName is required. | Optional | ||
FollowingId | Int32 | Id of user who is being followed. Either FollowingId or FollowingName is required. | Optional | ||
FollowingName | String | Username of user who is being followed. Either FollowingId or FollowingName is required. | Optional |
Returns
List
Lists following relationships for a follower
Velocity
#set($pagedListResponse = $core_v2_following.List("%{ FollowerId = $followerIdArg, FollowerName = $followerNameArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg }"))
JavaScript
var pagedListResponse = core_v2_following.List({ FollowerId: followerIdArg, FollowerName: followerNameArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FollowerId | Int32 | Id of user who is following. Either FollowerId or FollowerName is required. | Optional | ||
FollowerName | String | Username of user who is following. Either FollowerId or FollowerName is required. | 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 | |
SortBy | String | Sort by | Optional | Username | CreatedDate, DisplayName |
SortOrder | String | Sort order | Optional | Ascending | Ascending, Descending |