<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>core_v2_contentViews Script API</title><link>https://community.telligent.com/community/12/w/api-documentation/68604/core_5F00_v2_5F00_contentviews-script-api</link><description>Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>core_v2_contentViews Script API</title><link>https://community.telligent.com/community/12/w/api-documentation/68604/core_5F00_v2_5F00_contentviews-script-api</link><pubDate>Fri, 13 May 2022 19:25:11 GMT</pubDate><guid isPermaLink="false">15d74179-0c7f-4956-b1a1-0d85d88d93bf</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/12/w/api-documentation/68604/core_5F00_v2_5F00_contentviews-script-api#comments</comments><description>Current Revision posted to API Documentation by Former Member on 05/13/2022 19:25:11&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;div class="documentation"&gt;&lt;p&gt;Enables scripted content fragments to use Content Views&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="#GetViewCount"&gt;GetViewCount&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#IncrementViewCount"&gt;IncrementViewCount&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="documentation-members methods"&gt;&lt;h2&gt;&lt;a id="Methods" name="Methods"&gt;&lt;/a&gt;Methods&lt;/h2&gt;&lt;a name="GetViewCount"&gt;&lt;/a&gt;&lt;h3&gt;&lt;a id="GetViewCount" name="GetViewCount"&gt;&lt;/a&gt;GetViewCount&lt;/h3&gt;&lt;p&gt;Get the total number of views of a piece of content&lt;/p&gt;&lt;h4&gt;&lt;a id="Velocity" name="Velocity"&gt;&lt;/a&gt;&lt;em&gt;Velocity&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: velocity"&gt;#set($contentViewedItemResponse = $core_v2_contentViews.GetViewCount($contentId, $contentTypeId, &amp;quot;%{ ViewTypeId = $viewTypeIdArg }&amp;quot;))&lt;/pre&gt;&lt;h4&gt;&lt;a id="JavaScript" name="JavaScript"&gt;&lt;/a&gt;&lt;em&gt;JavaScript&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: javascript"&gt;var contentViewedItemResponse = core_v2_contentViews.GetViewCount(contentId, contentTypeId, { ViewTypeId: viewTypeIdArg });&lt;/pre&gt;&lt;h4&gt;&lt;a id="Parameters" name="Parameters"&gt;&lt;/a&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/h4&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;contentId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;ID of the content being viewed&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;contentTypeId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;Content Type ID of the content being viewed&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;options&lt;/td&gt;&lt;td rowspan="1"&gt;Options&lt;/td&gt;&lt;td rowspan="1"&gt;Set of optional parameters including:&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" style="padding-left:20px;"&gt;ViewTypeId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;ID representing type of view&lt;/td&gt;&lt;td rowspan="1"&gt;Optional&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h4&gt;&lt;a id="Returns" name="Returns"&gt;&lt;/a&gt;&lt;em&gt;Returns&lt;/em&gt;&lt;/h4&gt;&lt;p&gt;&lt;div&gt;&lt;code&gt;[[ContentViewedItem Script API Type|ContentViewedItem]]&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;&lt;a name="IncrementViewCount"&gt;&lt;/a&gt;&lt;h3&gt;&lt;a id="IncrementViewCount" name="IncrementViewCount"&gt;&lt;/a&gt;IncrementViewCount&lt;/h3&gt;&lt;h3&gt;&lt;a id="IncrementViewCount_Overload_1" name="IncrementViewCount_Overload_1"&gt;&lt;/a&gt;IncrementViewCount Overload 1&lt;/h3&gt;&lt;p&gt;Create a record of a piece of content being viewed. DEPRECATED in v12: Instead use the method signature that includes an options parameter.&lt;/p&gt;&lt;h4&gt;&lt;a id="Velocity" name="Velocity"&gt;&lt;/a&gt;&lt;em&gt;Velocity&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: velocity"&gt;$core_v2_contentViews.IncrementViewCount($contentId, $contentTypeId, $viewTypeId)&lt;/pre&gt;&lt;h4&gt;&lt;a id="JavaScript" name="JavaScript"&gt;&lt;/a&gt;&lt;em&gt;JavaScript&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: javascript"&gt;core_v2_contentViews.IncrementViewCount(contentId, contentTypeId, viewTypeId);&lt;/pre&gt;&lt;h4&gt;&lt;a id="Parameters" name="Parameters"&gt;&lt;/a&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/h4&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;contentId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;ID of the content being viewed&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;contentTypeId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;Content Type ID of the content being viewed&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;viewTypeId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;ID representing type of view&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;&lt;a id="IncrementViewCount_Overload_2" name="IncrementViewCount_Overload_2"&gt;&lt;/a&gt;IncrementViewCount Overload 2&lt;/h3&gt;&lt;p&gt;Create a record of a piece of content being viewed&lt;/p&gt;&lt;h4&gt;&lt;a id="Velocity" name="Velocity"&gt;&lt;/a&gt;&lt;em&gt;Velocity&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: velocity"&gt;$core_v2_contentViews.IncrementViewCount($contentId, $contentTypeId, &amp;quot;%{ ViewTypeId = $viewTypeIdArg }&amp;quot;)&lt;/pre&gt;&lt;h4&gt;&lt;a id="JavaScript" name="JavaScript"&gt;&lt;/a&gt;&lt;em&gt;JavaScript&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: javascript"&gt;core_v2_contentViews.IncrementViewCount(contentId, contentTypeId, { ViewTypeId: viewTypeIdArg });&lt;/pre&gt;&lt;h4&gt;&lt;a id="Parameters" name="Parameters"&gt;&lt;/a&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/h4&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;contentId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;ID of the content being viewed&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;contentTypeId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;Content Type ID of the content being viewed&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;options&lt;/td&gt;&lt;td rowspan="1"&gt;Options&lt;/td&gt;&lt;td rowspan="1"&gt;Set of optional parameters including:&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" style="padding-left:20px;"&gt;ViewTypeId&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;Guid&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The view type id of the content view.  As of 12.1 the default value is &amp;#39;00000000-0000-0000-0000-000000000000&amp;#39;.  If passing in a legacy value, the return value will contain a ViewTypeId value of &amp;#39;00000000-0000-0000-0000-000000000000&amp;#39;.&lt;/td&gt;&lt;td rowspan="1"&gt;Optional&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h4&gt;&lt;a id="Returns" name="Returns"&gt;&lt;/a&gt;&lt;em&gt;Returns&lt;/em&gt;&lt;/h4&gt;&lt;span&gt;Nothing&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>