-
-
Notifications
You must be signed in to change notification settings - Fork 2
Feed Retrieval Methods
Jorge Reyes edited this page Jun 3, 2015
·
2 revisions
- readFeed(feedURL, itemsType, maxItems) This method parses a feed and returns the results. It first looks for a valid server cached copy of the feed before going online for a copy.
<cfset rc.myFeed = getPlugin("feedReader").readFeed("http://www.example.com/feeds/atom","array",20)>
- retrieveFeed(feedURL, itemsType, maxItems) This method parses a feed and returns the results. It only ever fetches the feed online and never uses a server cached copy.
<cfset rc.myFeed = getPlugin("feedReader").retrieveFeed("http://www.example.com/feeds/atom","query",0)>
- parseFeed(xmlDoc, itemsType, maxItems) This method parses a feed that is provided in a CFML variable. It can not use a cached copy or go online to fetch a feed.
<--- Read feed from a XML file stored on the server --->
<cfset rc.myFile = getPlugin("Utilities").readFile("C:\www\xml\rss.xml")>
<--- Apply the xmlParse() function on the rc.myFile variable and parse the feed --->
<cfset rc.myFeed = getPlugin("feedReader").parseFeed(XmlParse(rc.myFile),"array",45)>
Arguments
- feedURL (required) URL to an online copy of the feed
- xmlDoc (required) Variable as a XML document object containing copy of the feed
- itemsType (optional) Parse the feed items as query or array, default is query
- maxItems (optional) Maximum number of feed items to display, default is 0 which displays all items
- Feed Reader * [RSS Syndication Format](https://github.com/ColdBox/cbox-feeds/wiki/RSS Syndication Format) * RDF Syndication Format * Atom Syndication Format * Supported Syntax and Formats
- Feed Generator
- Feed Generator Elements