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 | ||
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 | ||
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 | ||
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 | ||
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 content subscriptions for the accessing user
Velocity
#set($pagedListResponse = $core_v2_contentSubscription.List("%{ ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, ContainerId = $containerIdArg, ContentTypeId = $contentTypeIdArg, IncludeSubContainers = $includeSubContainersArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, TypeId = $typeIdArg }"))
JavaScript
var pagedListResponse = core_v2_contentSubscription.List({ ApplicationId: applicationIdArg, ApplicationTypeId: applicationTypeIdArg, ContainerId: containerIdArg, ContentTypeId: contentTypeIdArg, IncludeSubContainers: includeSubContainersArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
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 | ||
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 |
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 | ||
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