getFeedTemplates method: FeedFactory class

Syntax

getFeedTemplates(&searchRequest)

Description

Use this method to search feed template definitions based on user permissions and the search criteria specified in the SearchRequest object. The method returns a collection of feed template definitions. The list is sorted by the feed template definition's last updated time by default.

Parameters

Parameter Description

&searchRequest

Specifies the search criteria as a SearchRequest object.

Returns

A collection of Feed objects.

Example

import PTFP_FEED:FeedFactory;
import PTFP_FEED:UTILITY:SearchRequest;
import PTFP_FEED:UTILITY:Collection;

Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory();
Local PTFP_FEED:UTILITY:SearchRequest &request;
Local PTFP_FEED:UTILITY:Collection &feedTemplates;
Local array of string &thisDSS;

&request = create PTFP_FEED:UTILITY:SearchRequest("SearchResults");
&request.DataTypeID = "datatype_id";
&thisDSS = CreateArray("datasourcesetting_name", "datasourcesetting_value");
&request.DataSourceSettings.Push(&thisDSS);
&feedTemplates = &PTFP_FEED_FACTORY.getFeedTemplates(&request);