Enables scripted content fragments to use Friendships
Methods
Create
Create Overload 1
Create a friendship relationship
Velocity
#set($friendshipResponse = $core_v2_friendship.Create($recipientId, $requestMessage))
JavaScript
var friendshipResponse = core_v2_friendship.Create(recipientId, requestMessage);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
recipientId | Int32 | Recipient Id | Required | ||
requestMessage | String | Request Message | Required |
Create Overload 2
Create a friendship relationship
Velocity
#set($friendshipResponse = $core_v2_friendship.Create($recipientId, $requestMessage, "%{ RequestorId = $requestorIdArg, RequestorName = $requestorNameArg }"))
JavaScript
var friendshipResponse = core_v2_friendship.Create(recipientId, requestMessage, { RequestorId: requestorIdArg, RequestorName: requestorNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
recipientId | Int32 | Recipient Id | Required | ||
requestMessage | String | Request Message | Required | ||
options | Options | Set of optional parameters including: | Required | ||
RequestorId | Int32 | Either the RequestorId or the RequestorName is required | Optional | ||
RequestorName | String | Either the RequestorId or the RequestorName is required | Optional |
Returns
Delete
Deletes a friendship relationship
Velocity
#set($additionalInfoResponse = $core_v2_friendship.Delete("%{ RecipientId = $recipientIdArg, RecipientName = $recipientNameArg, RequestorId = $requestorIdArg, RequestorName = $requestorNameArg }"))
JavaScript
var additionalInfoResponse = core_v2_friendship.Delete({ RecipientId: recipientIdArg, RecipientName: recipientNameArg, RequestorId: requestorIdArg, RequestorName: requestorNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
RecipientId | Int32 | Either the RecipientId or the RecipientName is required | Optional | ||
RecipientName | String | Either the RecipientId or the RecipientName is required | Optional | ||
RequestorId | Int32 | Either the RequestorId or the RequestorName is required | Optional | ||
RequestorName | String | Either the RequestorId or the RequestorName is required | Optional |
Returns
Get
Gets a friendship
Velocity
#set($friendshipResponse = $core_v2_friendship.Get("%{ FriendId = $friendIdArg, FriendName = $friendNameArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var friendshipResponse = core_v2_friendship.Get({ FriendId: friendIdArg, FriendName: friendNameArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FriendId | Int32 | Either the FriendId or the FriendName is required | Optional | ||
FriendName | String | Either the FriendId or the FriendName is required | Optional | ||
UserId | Int32 | Either the UserId or the Username is required | Optional | ||
Username | String | Either the UserId or the Username is required | Optional |
Returns
List
List Overload 1
List friendships
Velocity
#set($pagedListResponse = $core_v2_friendship.List())
JavaScript
var pagedListResponse = core_v2_friendship.List();
List Overload 2
List friendships
Velocity
#set($pagedListResponse = $core_v2_friendship.List("%{ FriendshipState = $friendshipStateArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, Presence = $presenceArg, RecipientId = $recipientIdArg, RequestorId = $requestorIdArg, SearchText = $searchTextArg, SortBy = $sortByArg, SortOrder = $sortOrderArg }"))
JavaScript
var pagedListResponse = core_v2_friendship.List({ FriendshipState: friendshipStateArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, Presence: presenceArg, RecipientId: recipientIdArg, RequestorId: requestorIdArg, SearchText: searchTextArg, SortBy: sortByArg, SortOrder: sortOrderArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FriendshipState | String | Friendship State | Optional | Approved | Approved, NotSpecified, Pending |
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 | |
Presence | String | Filter by presence state | Optional | ||
RecipientId | Int32 | Recipient Id | Optional | ||
RequestorId | Int32 | Requestor Id | Optional | ||
SearchText | String | Text to filter friends by | Optional | ||
SortBy | String | Sort By | Optional | CreatedDate | CreatedDate, DisplayName, LastConversationDate, LastModifiedDate |
SortOrder | String | Sort Order | Optional | Ascending | Ascending, Descending |
Returns
Update
Updates a friendship status
Velocity
#set($friendshipResponse = $core_v2_friendship.Update($friendshipState, "%{ RecipientId = $recipientIdArg, RecipientName = $recipientNameArg, RequestorId = $requestorIdArg, RequestorName = $requestorNameArg }"))
JavaScript
var friendshipResponse = core_v2_friendship.Update(friendshipState, { RecipientId: recipientIdArg, RecipientName: recipientNameArg, RequestorId: requestorIdArg, RequestorName: requestorNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
friendshipState | String | Friendship State | Required | Approved, NotSpecified, Pending | |
options | Options | Set of optional parameters including: | Required | ||
RecipientId | Int32 | Either the RecipientId or the RecipientName is required | Optional | ||
RecipientName | String | Either the RecipientId or the RecipientName is required | Optional | ||
RequestorId | Int32 | Either the RequestorId or the RequestorName is required | Optional | ||
RequestorName | String | Either the RequestorId or the RequestorName is required | Optional |