Manage Group RSS Feeds

feed (Commands)
TypeCorrade progressive command
Commandfeed
DescriptionThe feed command allows managing RSS feeds.
Parametersgroup, password, action
Last ChangesRelease 9.74 - added the required name parameter.

The feed command can manage feeds for the specified group such that Corrade will poll the feeds continuously and, given an installed feed notification, will pass the data to the installed URL.

Command Required Parameters Required Corrade Permissions Example
feed group, password, action feed
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // subscribe to the Second Life 
            // grid status RSS feed
            "command", "feed",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "add",
            // a descriptive name for your feed
            "name", wasURLEscape("Second Life Grid Status"),
            "URL", wasURLEscape("https://status.secondlifegrid.net/history.rss"),
            "callback", wasURLEscape(URL)
        ]
    )
);
Parameter Possible value Second Parameter Description
action add URL Add an RSS feed to Corrade by URL.
name
remove URL Remove an RSS feed from Corrade by URL.
list List all RSS feeds by URL.

Tutorial

Corrade supports any number of RSS feeds bound to a group. In order to have Corrade poll for an RSS feed, you would first have to add the URL to Corrade using the feed command. For instance, we know the RSS feed to the grid status Second Life blog (the Blog options->Subscribe to RSS feed link) and we add it to Corrade:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // subscribe to the Second Life 
            // grid status RSS feed
            "command", "feed",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "add",
            "name", "GridStatus",
            "URL", wasURLEscape("https://community.secondlife.com/secondlife/rss/board?board.id=status-blog"),
            "callback", wasURLEscape(URL)
        ]
    )
);

We can also remove this URL later of course by setting the action parameter to remove:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // subscribe to the Second Life 
            // grid status RSS feed
            "command", "feed",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "remove",
            "URL", wasURLEscape("https://community.secondlife.com/secondlife/rss/board?board.id=status-blog"),
            "callback", wasURLEscape(URL)
        ]
    )
);

However, now that we have added the URL, Corrade will poll every FeedsUpdateInterval for news. In case that during the last FeedsUpdateInterval, any new items have been posted, then Corrade will send the news via the feed notification. So, in order to capture them, we will have to install a feed notification:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // set a notification to make
            // Corrade send any new RSS
            // posts to the given URL
            "command", "notify",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "set",
            "type", "feed",
            // send any new posts to URL
            "URL", wasURLEscape(URL),
            // to confirm that the notification
            // has been successfully installed
            "callback", wasURLEscape(URL)
        ]
    )
);

Now, every FeedsUpdateInterval, Corrade will poll for new RSS feed items and deliver them to the installed URL.


secondlife/scripted_agents/corrade/api/progressive/commands/feed.txt ยท Last modified: 2017/06/29 09:17 by Wizardry and Steamworks

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.