Packagecom.yahoo.social.utils
Classpublic class YahooURL

This class handles the creation of URLs to YOS web-services.


Example
  var url:YahooURL = new YahooURL("http", HOST_NAME);
  url.rawResource("v1/user");
  url.resource(guid);
  
  var req:URLRequest = new URLRequest(url.toString());
  



Public Properties
 PropertyDefined by
  hostname : String
The hostname.
YahooURL
  path : Array
[read-only] Returns the relative path represented as an array.
YahooURL
  port : int
The port.
YahooURL
  protocol : String
The request protocol.
YahooURL
  queryParameters : Object
Returns an object containing the query parameters.
YahooURL
  validProtocols : Array
[read-only] The valid protocols for use with this object.
YahooURL
Public Methods
 MethodDefined by
  
YahooURL(protocol:String, hostname:String, port:int = 80)
Creates a new YahooURL object.
YahooURL
  
filter(filtername:String, arguments:*):void
Applies a filter to the URL path.
YahooURL
  
rawResource(value:String):void
Applies a raw resource value to the URL path.
YahooURL
  
resetPath():void
Resets the relative path.
YahooURL
  
resource(value:String):void
Applies a resource value (url-encoded) to the URL path.
YahooURL
  
toPathString():String
Returns the relative URL as a representation of path, delimited by slashes.
YahooURL
  
toString():String
Returns the full URL.
YahooURL
Property detail
hostnameproperty
public var hostname:String

The hostname.

pathproperty 
path:Array  [read-only]

Returns the relative path represented as an array.

Implementation
    public function get path():Array
portproperty 
public var port:int

The port. (Default=80)

protocolproperty 
protocol:String  [read-write]

The request protocol.

Implementation
    public function get protocol():String
    public function set protocol(value:String):void
queryParametersproperty 
queryParameters:Object  [read-write]

Returns an object containing the query parameters.

Implementation
    public function get queryParameters():Object
    public function set queryParameters(value:Object):void
validProtocolsproperty 
validProtocols:Array  [read-only]

The valid protocols for use with this object.

Implementation
    public function get validProtocols():Array
Constructor detail
YahooURL()constructor
public function YahooURL(protocol:String, hostname:String, port:int = 80)

Creates a new YahooURL object.

Parameters
protocol:String — The request protocol.
 
hostname:String — The server hostname.
 
port:int (default = 80) — The server port.
Method detail
filter()method
public function filter(filtername:String, arguments:*):void

Applies a filter to the URL path.

Parameters
filtername:String
 
arguments:*
rawResource()method 
public function rawResource(value:String):void

Applies a raw resource value to the URL path.

Parameters
value:String
resetPath()method 
public function resetPath():void

Resets the relative path.

resource()method 
public function resource(value:String):void

Applies a resource value (url-encoded) to the URL path.

Parameters
value:String
toPathString()method 
public function toPathString():String

Returns the relative URL as a representation of path, delimited by slashes.

Returns
String
toString()method 
public function toString():String

Returns the full URL.

Returns
String