ReadSelectedProperties
Read all the global properties of the app identified by the property names provided in parameter.
Service | Operation |
---|---|
globalApp | READ_SELECTED_PROPERTIES |
Method Parameters
Parameter | Description |
---|---|
propertyNames | List of property names identifying the global properties to return. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string[] propertyNames = { "pName1", "pName2" };
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.GlobalAppService.ReadSelectedProperties(propertyNames, successCallback, failureCallback);
std::vector<std::string> propertyNames;
propertyNames.push_back("pName1");
propertyNames.push_back("pName2");
_bc->getGlobalAppService()->readSelectedProperties(propertyNames, this);
NSArray *propertyNames = @[ @"pName1", @"pName2" ];
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc globalAppService] readSelectedProperties:propertyNames
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String[] propertyNames = { "pName1", "pName2" };
this; // implements IServerCallback
_bc.getGlobalAppService().readSelectedProperties(propertyNames, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var propertyNames = [ "pName1", "pName2" ];
_bc.globalApp.readSelectedProperties(propertyNames, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var propertyNames = [ "pName1", "pName2" ];
ServerResponse result = await _bc.globalAppService.readSelectedProperties(propertyNames:propertyNames);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var propertyNames = [ "pName1", "pName2" ];
var globalAppProxy = bridge.getGlobalAppServiceProxy();
var postResult = globalAppProxy.readSelectedProperties(propertyNames);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalApp",
"operation": "READ_SELECTED_PROPERTIES",
"data": {
"propertyNames": ["comma separated property names"]
}
}
JSON Response
{
"status":200,
"data":{
"pName1": {
"name": "pName1",
"value": "value1"
},
"pName2": {
"name": "pName2",
"value": "value2"
}
}
}