Notch Notch Manual 0.9.23
 Light | Dark
GetEntryTitle()

GetEntryTitle()

Purpose #

Retrieves the title of a given RSS entry from an RSS Node.

Syntax #

string GetEntryTitle(int entry_index);

Parameters

entry_indexThe integer index of the entry, where 0 is the top of the list.

Example #

function Update()
{ 
    numLayers = Document.GetNumLayers();  
    layer = Document.GetLayer(0);
    layerEndTime = layer.GetEndTime();
    
    rssNode = layer.FindNode("RSSFeed").AsRSSFeedNode();
    textNode = layer.FindNode("MainText");

    numRssEntries = rssNode.GetNumEntries();
    entryIndex = 0;
    if (numRssEntries > 0)
    {
        entryText = rssNode.GetEntryTitle(entryIndex);
    }
    else
    {
        entryText = "No entries";
    }
    textNode.SetText(entryText);
}