| Package | yourminis.api.net |
| Class | public class RSSLoader |
| Inheritance | RSSLoader flash.net.URLLoader |
See also
| Property | Defined by | ||
|---|---|---|---|
| noCache : Boolean | RSSLoader | ||
| Method | Defined by | ||
|---|---|---|---|
|
getAuthorization():String
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 | ||
|
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)
| RSSLoader | ||
| noCache | property |
public var noCache:Boolean
| getAuthorization | () | method |
public function getAuthorization():StringReturns the authorization code for the widget in Base64 encoded form
ReturnsString |
See also
| getProxyUrl | () | method |
public function getProxyUrl(url:String):StringHelper function to build the yourminis.com proxy URL
Parametersurl:String — The URL to the RSS Feed
|
String |
See also
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):voidLoad an RSS feed. The feed will be converted to RSS 2.0, cached and proxied from the yourminis widget server.
Parametersrequest:URLRequest — The URL of the feed.
|
See also
| loadRSS | () | method |
public function loadRSS(url:String, un:String = "", pass:String = ""):voidLoad 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.
Parametersurl: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:*):voidSets the authorization for the feed given a username and password
Parametersun:* |
|
pw:* |
See also
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:*):voidSets the authorization for the feed (for example, you might store the authorization instead of the username/password if one were to copy the widget)
Parametersa:* — The encoded authorization string for the feed.
|
See also