addEntry method: FeedDoc class
Syntax
addEntry(entry_ID)
Description
Use this method to create a FeedEntry object with the given ID.
Note:
This is an abstract method.
Parameters
| Parameter | Description |
|---|---|
|
entry_ID |
Specifies the ID of the feed entry as a string. |
Returns
A FeedEntry object if successful, False otherwise.
Example
import PTFP_FEED:FeedFactory;
import PTFP_FEED:XML_FEED:FeedDoc;
import PTFP_FEED:XML_FEED:FeedEntry;
Local boolean &succeeded;
Local array of string &tempArray;
Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory();
Local PTFP_FEED:XML_FEED:FeedDoc &thisFeedDoc = &thisFeedFactory.Utility.⇒
getFeedDoc("feed_ID", &thisFeedFactory.Utility.FEEDFORMAT_ATOM10, Null);
Local PTFP_FEED:XML_FEED:FeedEntry &thisEntry = &thisFeedDoc.addEntry("entry_ID");
&thisEntry.Title = &contentTitle;
&thisEntry.Description = &contentEntryDesc;
&succeeded = &thisEntry.addCategory(&contentFolderTitle);
&thisEntry.ContentUrl = &contentUrl;
&thisEntry.GUID = &contentUrl;
&thisEntry.Published = &contentCreatedDateTime;
&thisEntry.Updated = &contentLastUpdatedDateTime;
&thisEntry.Author = &thisFeedFactory.Utility.getUserInfo(&contentCreatedByOprid);
&tempArray = &thisFeedFactory.Utility.getUserInfo(&contentLastUpdatedByOprid);
&succeeded = &thisEntry.addContributor(&tempArray [1], &tempArray [2]);
&succeeded = &thisEntry.addEnclosure(&contentAttachmentUrl, ⇒
"application/octet-stream", 123456);