Enables scripted content fragments to use Friendships
Methods
Create
Create a friendship relationship
Usage
#set($friendshipResponse = $core_v2_friendship.Create($recipientId, $requestMessage))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
recipientId | int | Recipient Id | Required | ||
requestMessage | string | Request Message | Required |
Return Type
Create
Create a friendship relationship
Usage
#set($friendshipResponse = $core_v2_friendship.Create($recipientId, $requestMessage, "%{RequestorId = $requestorIdArg, RequestorName = $requestorNameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
recipientId | int | Recipient Id | Required | ||
requestMessage | string | Request Message | Required | ||
RequestorId | int | Either the RequestorId or the RequestorName is required | Optional | ||
RequestorName | string | Either the RequestorId or the RequestorName is required | Optional |
Return Type
Delete
Deletes a friendship relationship
Usage
#set($additionalInfoResponse = $core_v2_friendship.Delete("%{RecipientId = $recipientIdArg, RecipientName = $recipientNameArg, RequestorId = $requestorIdArg, RequestorName = $requestorNameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
RecipientId | int | Either the RecipientId or the RecipientName is required | Optional | ||
RecipientName | string | Either the RecipientId or the RecipientName is required | Optional | ||
RequestorId | int | Either the RequestorId or the RequestorName is required | Optional | ||
RequestorName | string | Either the RequestorId or the RequestorName is required | Optional |
Return Type
Get
Gets a friendship
Usage
#set($friendshipResponse = $core_v2_friendship.Get("%{FriendId = $friendIdArg, FriendName = $friendNameArg, UserId = $userIdArg, Username = $usernameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
FriendId | int | Either the FriendId or the FriendName is required | Optional | ||
FriendName | string | Either the FriendId or the FriendName is required | Optional | ||
UserId | int | Either the UserId or the Username is required | Optional | ||
Username | string | Either the UserId or the Username is required | Optional |
Return Type
List
List friendships
Usage
#set($pagedListResponse = $core_v2_friendship.List())
Return Type
List
List friendships
Usage
#set($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 |
---|---|---|---|---|---|
FriendshipState | string | Friendship State | Optional | Approved | Approved, NotSpecified, Pending |
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 | |
Presence | string | Filter by presence state | Optional | ||
RecipientId | int | Recipient Id | Optional | ||
RequestorId | int | 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 |
Return Type
Update
Updates a friendship status
Usage
#set($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 | |
RecipientId | int | Either the RecipientId or the RecipientName is required | Optional | ||
RecipientName | string | Either the RecipientId or the RecipientName is required | Optional | ||
RequestorId | int | Either the RequestorId or the RequestorName is required | Optional | ||
RequestorName | string | Either the RequestorId or the RequestorName is required | Optional |