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
Friendship
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
Friendship
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
AdditionalInfo
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
Friendship
List
List friendships
Usage
#set($pagedListResponse = $core_v2_friendship.List())
Return Type
PagedList<Friendship>
List
List friendships
Usage
#set($pagedListResponse = $core_v2_friendship.List("%{FriendshipState = $friendshipStateArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, RecipientId = $recipientIdArg, RequestorId = $requestorIdArg, 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 | |
| RecipientId | int | Recipient Id | Optional | | |
| RequestorId | int | Requestor Id | Optional | | |
| SortBy | string | Sort By | Optional | CreatedDate | CreatedDate, CreatedDate |
| SortOrder | string | Sort Order | Optional | Ascending | Ascending, Descending |
Return Type
PagedList<Friendship>
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 | | |
| 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
Friendship