Enables scripted content fragments to use Friendships

Methods

Create

Create a friendship relationship

Usage

#set($friendshipResponse = $core_v2_friendship.Create($recipientId, $requestMessage))

Parameters

NameTypeDescriptionRequiredDefaultOptions
recipientIdintRecipient IdRequired
requestMessagestringRequest MessageRequired

Return Type

Friendship

Create

Create a friendship relationship

Usage

#set($friendshipResponse = $core_v2_friendship.Create($recipientId, $requestMessage, "%{RequestorId = $requestorIdArg, RequestorName = $requestorNameArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
recipientIdintRecipient IdRequired
requestMessagestringRequest MessageRequired
RequestorIdintEither the RequestorId or the RequestorName is requiredOptional
RequestorNamestringEither the RequestorId or the RequestorName is requiredOptional

Return Type

Friendship

Delete

Deletes a friendship relationship

Usage

#set($additionalInfoResponse = $core_v2_friendship.Delete("%{RecipientId = $recipientIdArg, RecipientName = $recipientNameArg, RequestorId = $requestorIdArg, RequestorName = $requestorNameArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
RecipientIdintEither the RecipientId or the RecipientName is requiredOptional
RecipientNamestringEither the RecipientId or the RecipientName is requiredOptional
RequestorIdintEither the RequestorId or the RequestorName is requiredOptional
RequestorNamestringEither the RequestorId or the RequestorName is requiredOptional

Return Type

AdditionalInfo

Get

Gets a friendship

Usage

#set($friendshipResponse = $core_v2_friendship.Get("%{FriendId = $friendIdArg, FriendName = $friendNameArg, UserId = $userIdArg, Username = $usernameArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
FriendIdintEither the FriendId or the FriendName is requiredOptional
FriendNamestringEither the FriendId or the FriendName is requiredOptional
UserIdintEither the UserId or the Username is requiredOptional
UsernamestringEither the UserId or the Username is requiredOptional

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

NameTypeDescriptionRequiredDefaultOptions
FriendshipStatestringFriendship StateOptionalApprovedApproved, NotSpecified, Pending
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20
RecipientIdintRecipient IdOptional
RequestorIdintRequestor IdOptional
SortBystringSort ByOptionalCreatedDateCreatedDate, CreatedDate
SortOrderstringSort OrderOptionalAscendingAscending, 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

NameTypeDescriptionRequiredDefaultOptions
friendshipStatestringFriendship StateRequired
RecipientIdintEither the RecipientId or the RecipientName is requiredOptional
RecipientNamestringEither the RecipientId or the RecipientName is requiredOptional
RequestorIdintEither the RequestorId or the RequestorName is requiredOptional
RequestorNamestringEither the RequestorId or the RequestorName is requiredOptional

Return Type

Friendship