[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public string GetSubscriptionsWithUserData( ConnectionId connectionId, SessionId sessionId, SubscriptionType subscriptionType, string address, SubscriberAddressType addressType )
Parameters
- connectionId
- Type: ContentStudioConnectionId
The connection id. - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). - subscriptionType
- Type: ContentStudio.Document.SubscriptionSubscriptionType
Type of subscription to list. - address
- Type: SystemString
The address of the subscriber. - addressType
- Type: ContentStudio.Document.SubscriptionSubscriberAddressType
Type of address specified in the address parameter.
Return Value
Type: StringXml which is can be a mixture of the xml returned from GetSubscribableCategories and GetSubscriptionDefinitionByAddress methods.
<root> <status>0</status> <statustext>Success</statustext> <definition identifier="Guid string value" categoryid="Integer value" name="String value" description="String value" enabled="Bit value" subscriptiontype="Integer value"> <!-- The subscription element is present when the subscriber has a subscription connected to this definition; otherwise, the elements is missing.--> <subscription subscriptionId="Guid string value" subscriberAddress="String value" subscriptionType="String value" subscriberAddressType="String value" subscriberName="String value" activated="Boolean string value" /> </definition> <!--more definition elements can follow --> </root>
Element/Attribute | Description |
---|---|
status | Integer: The outcome of the call, always 0 |
statustext | String: the textual outcome of the call, Always "Success" |
definition | This element represents a found category |
definition/@identifier | Guid: a global unique identifier of this data. This value can be used by external applications to connect a subscriber repository to a category |
definition/@categoryid | Integer: the Content Studio identifier of this category |
definition/@name | String: the name of the category |
definition/@description | String: a description of the category. |
definition/@enabled | Bit: indicates whether this subscription is enabled. |
definition/@subscriptiontype | Integer: the integer representation of the type of subscription. |
definition/subscription | This element represents the subscription for the specific user on the found definition. |
definition/subscription/@subscriptionId | Guid: a global unique identifier of a single subscription. |
definition/subscription/@subscriberAddress | String. The address of the subscription found. |
definition/subscription/@subscriptionType | String. The type of subscription. The value is the string representation one of the members of the SubscriptionType enumeration. |
definition/subscription/@subscriberAddressType | String. The type of address. The value is the string representation one of the members of the SubscriberAddressType enumeration. |
definition/subscription/@subscriberName | String. The name of the subscriber of the subscription found. |
definition/subscription/@activated | Boolean string; True or False. Defines whether this subscription is activated. |
Note that the subscription sub-node is only present when the subscriber has a subscription on the returned definition.
GetSubscriptionsWithUserData can be used when building a "My existing and possible subscriptions" application.
This method combines the result from the GetSubscribableCategories and GetSubscriptionDefinitionByAddress methods. All found items from GetSubscriptionDefinitionByAddress are kept while any duplicates are removed from GetSubscribableCategories. The documents are joined together and sorted by name.