SystemResource
d7-services.resources.system
This service mirrors the Drupal system resource of the services 3.x module. To use this you have to set following line in your Drupal CORS module settings
Returns the details of currently logged in user.
Method: POST Url: http://drupal_instance/api_endpoint/system/connect
Promise | Object with session id, session name and a user object. |
performing a system connect request and handling data in promise callback
angular .module('myModule', ['d7-services.resources.system']) .config(function (SystemResource) { SystemResource.connect() .then( function(confirmData) {...}, function(failData) {...} ); }
performing a system connect request and handling data in event callback
angular .module('myModule', ['d7-services.resources.system']) .config(function ($scope, SystemResource, SystemChannel) { SystemResource.connect(); //subscribe to confirm event SystemChannel.subConnectConfirm($scope, function(confirmData) {...}); //subscribe to fail event SystemChannel.subConnectConfirm($scope, function(failData) {...}); });
Unsets a persistent variable. Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.
Method: POST Url: http://drupal_instance/api_endpoint/system/del_variable
Param | Type | Details |
---|---|---|
data | Object |
|
data.name | String |
|
Promise | True if successful false if not |
Returns a persistent variable. Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.
Method: POST Url: http://drupal_instance/api_endpoint/system/get_variable
Param | Type | Details |
---|---|---|
data | Object |
|
data.name | String |
|
data._default | String |
|
Promise | Object with session id, session name and a user object. |
Sets a persistent variable. Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.
Method: POST Url: http://drupal_instance/api_endpoint/system/set_variable
Param | Type | Details |
---|---|---|
data | Object |
|
data.name | String |
|
data.value | String |
|
Promise | True if successful false if not |