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