Enables scripted content fragments to use Forum Thread Votes
Methods
Create
Creates and VoteType of Interest with the value of {Up} vote for a thread for the accessing user
Usage
#set($forumThreadVoteResponse = $core_v2_forumThreadVote.Create($threadId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread being voted on | Required |
Return Type
Create
Votes for a thread for the accessing user
Usage
#set($forumThreadVoteResponse = $core_v2_forumThreadVote.Create($threadId, "%{Value = $valueArg, VoteType = $voteTypeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread being voted on | Required | ||
Value | bool | Vote Value: Up (true) or Down (false). Only true is accepted when the VoteType is Interest. | Optional | True | |
VoteType | string | Either Interest or Quality. Interest VoteType can only be on QuestionAndAnswer threads. Only Quality votes can be down voted. | Optional | Interest |
Return Type
Delete
Removes a vote with the VoteType of Interest for a thread for the accessing user
Usage
#set($additionalInfoResponse = $core_v2_forumThreadVote.Delete($threadId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread that was voted on | Required |
Return Type
Delete
Removes a vote for a thread for the accessing user
Usage
#set($additionalInfoResponse = $core_v2_forumThreadVote.Delete($threadId, "%{VoteType = $voteTypeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread that was voted on | Required | ||
VoteType | string | Either Interest or Quality. Interest can only be on QuestionAndAnswer threads. Only Quality votes can be down voted. | Optional | Interest |
Return Type
Get
Gets an existing vote with the VoteType of Interest for a thread for the accessing user
Usage
#set($forumThreadVoteResponse = $core_v2_forumThreadVote.Get($threadId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread voted on | Required |
Return Type
Get
Gets an existing vote for a thread for the accessing user
Usage
#set($forumThreadVoteResponse = $core_v2_forumThreadVote.Get($threadId, "%{VoteType = $voteTypeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread voted on | Required | ||
VoteType | string | Either Interest or Quality. Interest VoteType can only be on QuestionAndAnswer threads. Only Quality votes can be down voted. | Optional | Interest |
Return Type
List
Lists thread votes
Usage
#set($pagedListResponse = $core_v2_forumThreadVote.List($threadId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Thread Id | Required |
Return Type
List
Lists thread votes
Usage
#set($pagedListResponse = $core_v2_forumThreadVote.List($threadId, "%{PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg, Value = $valueArg, VoteType = $voteTypeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Thread Id | Required | ||
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 | |
SortBy | string | Sort mechanism | Optional | Date | Date |
SortOrder | string | Sort order | Optional | Descending | Ascending, Descending |
UserId | int | Specify the user id. | Optional | ||
Value | bool | Vote Value: Up (true) or Down (false). | Optional | ||
VoteType | string | Vote Type | Optional | Interest | Interest, Quality |
Return Type
Update
Updates an existing vote for a thread for the accessing user
Usage
#set($forumThreadVoteResponse = $core_v2_forumThreadVote.Update($threadId, "%{Value = $valueArg, VoteType = $voteTypeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Id of the thread being voted on | Required | ||
Value | bool | Vote Value: Up (true) or Down (false). Only true is accepted when the VoteType is Interest. | Optional | True | |
VoteType | string | Either Interest or Quality. Interest VoteType can only be on QuestionAndAnswer threads. Only Quality votes can be down voted. | Optional | Interest |