Enables scripted content fragments to use content subscriptions
Methods
CanDeleteSubscription
CanDeleteSubscription Overload 1
Returns whether the accessing user can delete a subscription to a piece of content
Velocity
#set($booleanResponse = $core_v2_contentSubscription.CanDeleteSubscription($contentId, $subscribedUserId, "%{ TypeId = $typeIdArg }"))
JavaScript
var booleanResponse = core_v2_contentSubscription.CanDeleteSubscription(contentId, subscribedUserId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
subscribedUserId | Int32 | User who subscribed the application | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
CanDeleteSubscription Overload 2
Returns whether the accessing user can delete a subscription to a piece of content
Velocity
#set($booleanResponse = $core_v2_contentSubscription.CanDeleteSubscription($contentId, $subscribedUserId))
JavaScript
var booleanResponse = core_v2_contentSubscription.CanDeleteSubscription(contentId, subscribedUserId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
subscribedUserId | Int32 | User who subscribed the content | Required |
Returns
Boolean
CanSubscribe
Identifies if the accessing user can bookmark the given piece of content
Velocity
#set($booleanResponse = $core_v2_contentSubscription.CanSubscribe($contentId, $contentTypeId))
JavaScript
var booleanResponse = core_v2_contentSubscription.CanSubscribe(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Returns
Boolean
Create
Set a subscription to a piece of content
Velocity
#set($contentSubscriptionResponse = $core_v2_contentSubscription.Create($contentId, $contentTypeId, "%{ TypeId = $typeIdArg }"))
JavaScript
var contentSubscriptionResponse = core_v2_contentSubscription.Create(contentId, contentTypeId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Optional Type Id of the subscription. | Optional |
Returns
Delete
Remove a subscription to a piece of content
Velocity
#set($contentSubscriptionResponse = $core_v2_contentSubscription.Delete($contentId, $contentTypeId, "%{ TypeId = $typeIdArg }"))
JavaScript
var contentSubscriptionResponse = core_v2_contentSubscription.Delete(contentId, contentTypeId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Optional Type Id of the subscription. | Optional |
Returns
Get
Retrieve a subscription to a piece of content
Velocity
#set($contentSubscriptionResponse = $core_v2_contentSubscription.Get($contentId, "%{ IncludeApplicationSubscriptions = $includeApplicationSubscriptionsArg, TypeId = $typeIdArg }"))
JavaScript
var contentSubscriptionResponse = core_v2_contentSubscription.Get(contentId, { IncludeApplicationSubscriptions: includeApplicationSubscriptionsArg, TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
IncludeApplicationSubscriptions | Boolean | When true, will consider a user subscribed to the content if they are subscribed to the parent application. | Optional | True | |
TypeId | Guid | Optional Type Id of the subscription. | Optional |
Returns
List
List Overload 1
List content subscriptions for the accessing user
Velocity
#set($pagedListResponse = $core_v2_contentSubscription.List("%{ ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, ContainerId = $containerIdArg, ContentTypeId = $contentTypeIdArg, IncludeAllTypeIds = $includeAllTypeIdsArg, IncludeSubContainers = $includeSubContainersArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, TypeId = $typeIdArg }"))
JavaScript
var pagedListResponse = core_v2_contentSubscription.List({ ApplicationId: applicationIdArg, ApplicationTypeId: applicationTypeIdArg, ContainerId: containerIdArg, ContentTypeId: contentTypeIdArg, IncludeAllTypeIds: includeAllTypeIdsArg, IncludeSubContainers: includeSubContainersArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ApplicationId | Guid | Filter to this application. | Optional | ||
ApplicationTypeId | Guid | Filter to this application type. | Optional | ||
ContainerId | Guid | Filter to this container. | Optional | ||
ContentTypeId | Guid | Filter to this content type. | Optional | ||
IncludeAllTypeIds | Boolean | Option to include all Type Id's. If TypeId is passed in, will be ignored. | Optional | False | |
IncludeSubContainers | Boolean | Include subcontainers of the ContainerId. | Optional | ||
PageIndex | Int32 | Page index for the results. | Optional | ||
PageSize | Int32 | Page size for the results. | Optional | ||
TypeId | Guid | Optional Type Id of the subscription. | Optional |
List Overload 2
List content subscriptions
Velocity
#set($pagedListResponse = $core_v2_contentSubscription.List($contentId, $contentTypeId, "%{ IncludeApplicationSubscriptions = $includeApplicationSubscriptionsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, TypeId = $typeIdArg, UsernameSearch = $usernameSearchArg }"))
JavaScript
var pagedListResponse = core_v2_contentSubscription.List(contentId, contentTypeId, { IncludeApplicationSubscriptions: includeApplicationSubscriptionsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg, TypeId: typeIdArg, UsernameSearch: usernameSearchArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
IncludeApplicationSubscriptions | Boolean | Include members who are subscribed to application and have not muted this content. | Optional | False | |
PageIndex | Int32 | Page index for the results. | Optional | ||
PageSize | Int32 | Page size for the results. | Optional | ||
SortBy | String | Sort By | Optional | Default | Default, Username |
SortOrder | String | Sort Order | Optional | Ascending | Ascending, Descending |
TypeId | Guid | Optional Type Id of the subscription. | Optional | ||
UsernameSearch | Guid | Username to filter by. | Optional |
Returns
MuteSubscription
Velocity
$core_v2_contentSubscription.MuteSubscription($contentId, $contentTypeId, $isMuted, "%{ TypeId = $typeIdArg }")
JavaScript
core_v2_contentSubscription.MuteSubscription(contentId, contentTypeId, isMuted, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
isMuted | Boolean | Is Muted | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Optional Type Id of the subscription. | Optional |
Returns
NothingSupportsSubscriptions
Identifies whether the specified application type supports subscriptions
Velocity
#set($booleanResponse = $core_v2_contentSubscription.SupportsSubscriptions($contentTypeId))
JavaScript
var booleanResponse = core_v2_contentSubscription.SupportsSubscriptions(contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentTypeId | Guid | Content Type Id | Required |
Returns
Boolean