RemoveUserItemFromBlockchain
Removes the specified item from the item management attached blockchain. Results are reported asynchronously via an RTT event.
Service | Operation |
---|---|
userItems | REMOVE_USER_ITEM_FROM_BLOCKCHAIN |
Method Parameters
Parameter | Description |
---|---|
itemId | The unique id of the user item. |
version | The version of the user item being removed. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string itemId = "aaa-bbb-ccc-ddd";
int version = 1;
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.UseritemsService.RemoveUserItemFromBlockchain(itemId, version, successCallback, failureCallback);
const char *itemId = "aaa-bbb-ccc-ddd";
int version = 1;
_bc.getUseritemsService().removeUserItemFromBlockchain(itemId, version, this);
NSString *itemId = @"aaa-bbb-ccc-ddd";
int version = 1;
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc userItemsService] RemoveUserItemFromBlockchain:
itemId:itemId
version:version
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil]
String itemId = "aaa-bbb-ccc-ddd";
int version = 1;
this; // implements IServerCallback
_bc.getUseritemsService.RemoveUserItemFromBlockchain(itemId, version, 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 itemId = "aaa-bbb-ccc-ddd";
var version = 1;
_bc.userItems.RemoveUserItemFromBlockchain(itemId, version, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var itemId = "aaa-bbb-ccc-ddd";
var version = 1;
ServerResponse result = await _bc.userItemsService.RemoveUserItemFromBlockchain(itemId:itemId, version:version);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var itemId = "aaa-bbb-ccc-ddd";
var version = 1;
var userItemsProxy = bridge.getUseritemsServiceProxy();
var postResult = userItemsProxy.RemoveUserItemFromBlockchain(itemId, version);
{
"service":"userItems",
"operation":"REMOVE_USER_ITEM_FROM_BLOCKCHAIN",
"data":{
"itemId":"aaa-bbb-ccc-ddd",
"version":1
}
}
JSON Response
{
"status" : 200,
"data" : null
}