ReadPropertiesInCategories
Read all the global properties of the app that exist in any of the categories provided.
Service | Operation |
---|---|
globalApp | READ_PROPERTIES_IN_CATEGORIES |
Method Parameters
Parameter | Description |
---|---|
categories | List of categories to retrieve the global properties. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string[] categories = { "cName1", "cName2" };
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.ReadPropertiesInCategories(categories, successCallback, failureCallback);
std::vector<std::string> categories;
categories.push_back("cName1");
categories.push_back("cName2");
_bc->getGlobalAppService()->readPropertiesInCategories(categories, this);
NSArray *categories = @[ @"cName1", @"cName2" ];
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc globalAppService] readPropertiesInCategories:categories
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String[] categories = { "cName1", "cName2" };
this; // implements IServerCallback
_bc.getGlobalAppService().readPropertiesInCategories(categories, 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 categories = [ "cName1", "cName2" ];
_bc.globalApp.readPropertiesInCategories(categories, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var categories = [ "cName1", "cName2" ];
ServerResponse result = await _bc.globalAppService.readPropertiesInCategories(categories:categories);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var categories = [ "cName1", "cName2" ];
var globalAppProxy = bridge.getGlobalAppServiceProxy();
var postResult = globalAppProxy.readPropertiesInCategories(categories);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalApp",
"operation": "READ_PROPERTIES_IN_CATEGORIES",
"data": {
"categories": ["comma separated category strings"]
}
}
JSON Response
{
"status":200,
"data":{
"pName1": {
"name": "pName1",
"value": "value1"
},
"pName2": {
"name": "pName2",
"value": "value2"
}
}
}