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
  
load(request:URLRequest):void
Load an RSS feed.
RSSLoader
  
loadRSS(url:String, un:String = "", pass:String = ""):void
Load a secured RSS feed.
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
Create a URLRequest object and proxy URL
  import yourminis.api.IWidget
  var widget:IWidget;
  addEventListener("widget-loaded",onWidgetLoaded);
  function onWidgetLoaded(evt:Event) {
   widget.initWidget(300,250,0x000000);
   widget.debugMode = true;
   var loader:URLLoader = new URLLoader();
   loader.addEventListener(Event.COMPLETE, completeHandler);
    
   var url:String = "http://www.some3rdPartyDomain.com/server.php";
   var request:URLRequest = new URLRequest(widget.newRSS().getProxyUrl(url));
   try {
    loader.load(request);
   } catch (error:Error) {
    widget.debug("Unable to load requested document.");
   }
  }
  function completeHandler(event:Event):void {
   var loader:URLLoader = URLLoader(event.target);
   widget.debug("loaded: " + loader.data);
  }
 

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

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), default: ""
 
pass:String (default = "") — password (secure feed), default: ""

See also

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

Sets the authorization for the feed given a username and password

Parameters
un:*
 
pw:*

See also


Example
The following code shows how to get and set the authorization for your feed
  var rss;
  import yourminis.api.IWidget
  var widget:IWidget;
  addEventListener("widget-loaded",onWidgetLoaded);
  function onWidgetLoaded(evt:Event) {
   widget.initWidget(300,250,0x000000);
   widget.debugMode = true;
   rss = widget.newRSS();
   rss.setAuthorization("userName","password");
   var tempVar = rss.getAuthorization();
   widget.debug(tempVar); //lets see what the authorization string looks like
   rss.setEncodedAuthorization(tempVar); //this is not necessary, but we could store tempvar and load it later, instead of storing a username and password
   
   //if you wanted to load a feed that required authorization, you would do the following:
   //rss.loadRSS("myURL","myUserName","myPassword") where
   //"myURL" is a string containing the URL you wish to load
   //"myUserName" is a string containing the username to log in with
   //"myPassword" is a string containing the password to log in with
  }
 

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