Packageyourminis.api.net
Classpublic class RSSLoader
InheritanceRSSLoader Inheritance flash.net.URLLoader

RSS Class providing: RSS 0.9x, RSS 1.0, ATOM 0.3, ATOM 1.0 conversion to RSS 2.0, server-side caching, authorization, and proxing to 3rd party feeds.

See also

yourminis.api.Widget.newRSS()


Public Properties
 PropertyDefined by
  noCache : Boolean
RSSLoader
Public Methods
 MethodDefined by
  
Returns the authorization code for the widget in Base64 encoded form
RSSLoader
  
getProxyUrl(url:String):String
Helper function to build the yourminis.com proxy URL
RSSLoader
  
ioErrorHandler(evt:IOErrorEvent):*
RSSLoader
  
load(request:URLRequest):void
Load an RSS feed.
RSSLoader
  
loadRSS(url:String, un:String = "", pass:String = ""):void
Load a secured RSS feed.
RSSLoader
  
onRSSComplete(evt:Event):void
RSSLoader
  
securityErrorHandler(evt:SecurityErrorEvent):*
RSSLoader
  
setAuthorization(un:*, pw:*):void
Sets the authorization for the feed given a username and password
RSSLoader
  
Sets the authorization for the feed (for example, you might store the authorization instead of the username/password if one were to copy the widget)
RSSLoader
Property detail
noCacheproperty
public var noCache:Boolean
Method detail
getAuthorization()method
public function getAuthorization():String

Returns the authorization code for the widget in Base64 encoded form

Returns
String

See also

getProxyUrl()method 
public function getProxyUrl(url:String):String

Helper function to build the yourminis.com proxy URL

Parameters
url:String — The URL to the RSS Feed

Returns
String

See also


Example
The following code tracks a URL

ioErrorHandler()method 
public function ioErrorHandler(evt:IOErrorEvent):*Parameters
evt:IOErrorEvent

Returns
*
load()method 
public override function load(request:URLRequest):void

Load an RSS feed. The feed will be converted to RSS 2.0, cached and proxied from the yourminis widget server.

Parameters
request:URLRequest — The URL of the feed.

See also


Example
Example The following code will parse an rss feed and display the title and description of each item in a text field
  var widget; //Widget
  var rss;
  addEventListener("widget-loaded",onWidgetLoaded);
  
  function onWidgetLoaded(evt:Event)
  {
   //your widget has started and is ready for display
   rss = widget.newRSS();
   rss.addEventListener(Event.COMPLETE,onRSSLoaded);
   rss.load(new URLRequest("http://feeds.feedburner.com/yourminis"));
  }
  
  function onRSSLoaded(evt:Event)
  {
   var loader:URLLoader = URLLoader(evt.target);
   
   namespace dc="http://purl.org/dc/elements/1.1/";
   namespace content="http://purl.org/rss/1.0/modules/content/";
   namespace geo="http://www.w3.org/2003/01/geo/wgs84_pos#";
   
   var rssxml:XML = XML(loader.data);
   
   var str = "";
   for each (var item:XML in rssxml..item)
   {
    str+="<b><a href='" + item.link + "' target='_blank'><u>" + item.title + "</u></a></b>";
    str+="<br/>" + item.description + "<br/><br/>";
    
   }
   output_txt.htmlText = str;
  }
 

loadRSS()method 
public function loadRSS(url:String, un:String = "", pass:String = ""):void

Load a secured RSS feed. The feed will be converted to RSS 2.0, cached (for non-authorized requests) and proxied from the yourminis widget server. Authorization is optional.

Parameters
url:String — The URL of the feed.
 
un:String (default = "") — username (secure feed)
 
pass:String (default = "") — password (secure feed)

See also

onRSSComplete()method 
public function onRSSComplete(evt:Event):voidParameters
evt:Event
securityErrorHandler()method 
public function securityErrorHandler(evt:SecurityErrorEvent):*Parameters
evt:SecurityErrorEvent

Returns
*
setAuthorization()method 
public function setAuthorization(un:*, pw:*):void

Sets the authorization for the feed given a username and password

Parameters
un:* — The username for the feed.
 
pw:* — The username for the feed.

See also

setEncodedAuthorization()method 
public function setEncodedAuthorization(a:*):void

Sets the authorization for the feed (for example, you might store the authorization instead of the username/password if one were to copy the widget)

Parameters
a:* — The encoded authorization string for the feed.

See also