<% var blogURL = "http://madhukaudantha.blogspot.com/feeds/posts/default"; var feed= new Feed(blogURL); print("Feed Title : " + feed.title + "<br/>"); print("Feed author is : " + feed.authors[0] + "<br/>"); print("First five entries are :</br>"); var entries = feed.entries; for(var i=0;i < 5; i++) { var entry = entries[i]; %> <tr> <td><%=entry.title%></br></td> </tr> <% } %>
The Feed API handles reading and writing Atom feeds
Member | Type | Description |
---|---|---|
entries | Entry[] | feed.entries; Returns the complete set of entries contained in this feed. feed.entries = entryList; setting an entry list for to feed. |
author | String | feed.author Returns the author of the feed. feed.author = "author1"; Setting an author to the feed. |
authors | String [ ] | feed.category[i] Returns the i th category of the feed. feed.category = ["cat1","cat2"]; Setting an array of categories to the feed. |
category | String [ ] | feed.author Returns the author of the feed. feed.author = "author1"; Setting an author to the feed. |
contributors | String [ ] | feed.contributors[i] Returns the i th contributor of the feed. feed.contributors = ["cont1","cont2"]; Setting an array of contributor to the feed. |
logo | String | feed.logo Returns the logo of this feed. feed.logo = "http://abc.blogspot.com/Blogger-logo.png"; |
icon | String | feed.icon Returns the icon URL of this feed. feed.icon = "http://abc.blogspot.com/RSS_Feed_Button.jpg"; Setting icon URL of this feed. |
links | String [ ] | feed.links[i] Returns the i th location of the feed. feed.links = ["link1","link2"]; Setting locations of the feed. |
title | String | feed.title Returns the title of the feed. feed.title = "title"; Setting the title of the feed. |
rights | String | feed.rights Returns the rights of the feed. feed.rights = "rights"; Setting the rights for the feed. |
updated | Date | feed.updated Returns the last updated date of the feed. var d1 = new Date("March 13, 2013 11:13:00") feed.updated = d1; Setting the last updated date of the feed. |
Operations | Returns | Description |
---|---|---|
Feed([url]) | Feed | var feed= new Feed(blogURL);Returns a Feed object |
toXML() | XML | feed.toXML()Returns the E4X XML contents of this Feed object. |
toString() | String | feed.toString()Returns the String representation of the feed |