DetachPeer
Detaches a peer identity from the current profile.
Service | Operation |
---|---|
identity | DETACH_PEER |
Method Parameters
Parameter | Description |
---|---|
peer | Identifies the peer of the profile you wish to detach |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string peer = "test";
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.IdentityService.DetachPeer(peer, successCallback, failureCallback);
const char *peer = "test";
_bc->getIdentityService()->detachPeer(peer, this);
NSString *peer = @"test";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc identityService] detachPeer:peer
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String peer = "test";
this; // implements IServerCallback
_bc.getIdentityService().detachPeer(peer, 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 peer = "test";
_bc.identity.detachPeer(peer, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var peer = "test";
ServerResponse result = await _bc.identityService.detachPeer(peer:peer);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var peer = "test";
var identityProxy = bridge.getIdentityServiceProxy();
var postResult = identityProxy.detachPeer(peer);
if (postResult.status == 200) {
// Success!
}
{
"service": "identity",
"operation": "DETACH_PEER",
"data": {
"peer": "test"
}
}
JSON Response
{
"status" : 200,
"data" : {
"profileId" : "1234-1234-1234-1234"
}
}