public function SoundcloudDelegate(url:String, method:String, consumer:OAuthConsumer, token:OAuthToken = null, data:Object = null, responseFormat:String, dataFormat:String)
The constructor only builds the request object and adds response listeners.
The method execute must be called subsequently to send the actual request.
Parameters | url:String — The full URL, e.g. "http://api.soundcloud.com/user/userid/tracks"
|
| |
| method:String — GET, POST, PUT or DELETE. Note that FlashPlayer
only supports GET and POST as of this writing.
AIR supports all four methods.
|
| |
| consumer:OAuthConsumer — The OAuth consumer. This parameter is not optional, but the token can
be empty if you only want to access public resources.
|
| |
| token:OAuthToken (default = null) — (optional) The OAuth token. If this parameter is omitted you can only
access public resources.
|
| |
| data:Object (default = null) — (optional) the data to be sent. This can be a generic object
containing request parameters as key/value pairs or a XML object
|
| |
| responseFormat:String — (optional) tells Soundcloud whether to render response as JSON or XML.
Value must be SoundcloudResponseFormat.JSON, .XML or an empty String
(default) which will also return XML
|
| |
| dataFormat:String — (optional) tells the URLLoader how to handle the returned data. Must
be URLLoaderDataFormat.TEXT, .VARIABLES or .BINARY. If responseFormat
is JSON or XML this parameter will be overriden with .TEXT
|
public function execute():void
Sends the actual request.
Event Object Type: flash.events.ProgressEventProgressEvent.type property = flash.events.ProgressEvent.PROGRESS
Progress event of file upload.
Event Object Type: com.dasflash.soundcloud.as3api.events.SoundcloudEventSoundcloudEvent.type property = com.dasflash.soundcloud.as3api.events.SoundcloudEvent.REQUEST_COMPLETE
Dispatched after the response has been downloaded and parsed successfully.