| Package | com.thirdavedesign.drupalSite.connection |
| Class | public class Amf |
| Subclasses | DrupalSite |
Amf provides a basic method (service) for invoking a Drupal service via an Amf connection. This method establishes a NetConnection if one is not already configured. It handles the response from the NetConnection, which it passes to a callback function, if specified.
Amf also provides a connect method, which ensures that the Amf class has the current session ID.
| Property | Defined by | ||
|---|---|---|---|
| apiKey : String = ""
API key for Drupal services.
| Amf | ||
| gatewayUrl : String = ""
URL to the Drupal services AMFPHP gateway.
| Amf | ||
| sessionId : String = ""
Session ID from successful connection to Drupal services.
| Amf | ||
| Method | Defined by | ||
|---|---|---|---|
|
connect(onSuccess:Function):void
Invoke Drupal system.connect service method to establish connection
with Drupal services.
| Amf | ||
|
service(onSuccess:Function, onFault:Function, command:String, ... args):Boolean
Invoke Drupal services method.
| Amf | ||
| apiKey | property |
public var apiKey:String = ""API key for Drupal services.
| gatewayUrl | property |
public var gatewayUrl:String = ""URL to the Drupal services AMFPHP gateway.
| sessionId | property |
public var sessionId:String = ""Session ID from successful connection to Drupal services.
| connect | () | method |
public function connect(onSuccess:Function):voidInvoke Drupal system.connect service method to establish connection with Drupal services.
ParametersonSuccess:Function — Callback function on successful connection.
|
| service | () | method |
public function service(onSuccess:Function, onFault:Function, command:String, ... args):BooleanInvoke Drupal services method.
ParametersonSuccess:Function — Callback function on successful call.
|
|
onFault:Function — Callback function on failed call.
|
|
command:String — Drupal services method to invoke.
|
|
... args — args [Optional] Arguments to pass to Drupal services method.
If only one argument is supplied and it is an array, then it is taken as
the array of arguments with which to invoke the Drupal service.
For example, the following calls of the service method result in the same arguments being passed to Drupal: Amf.service(onSuccess, onFault, 'node.load', apikey, sessid, nid); Amf.service(onSuccess, onFault, 'node.load', new Array(apikey, sessid, nid)); |
Boolean |