ListGroupsWithMember
Retrieve group summary information about the groups in which the specified user is a member.
Service | Operation |
---|---|
group | LIST_GROUPS_WITH_MEMBER |
Method Parameters
Parameter | Description |
---|---|
profileId | ID of the user to search for |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string profileId = "profileId";
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.Group.ListGroupsWithMember(profileId, successCallback, failureCallback);
const char *profileId = "profileId";
_bc->getGroup()->listGroupsWithMember(profileId, this);
NSString *profileId = @"profileId";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc groupService] listGroupsWithMember:profileId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String profileId = "profileId";
this; // implements IServerCallback
_bc.getGroup().listGroupsWithMember(profileId, 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 profileId = "profileId";
_bc.group.listGroupsWithMember(profileId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var profileId = "profileId";
ServerResponse result = await _bc.groupService.listGroupsWithMember(profileId:profileId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var profileId = "profileId";
var groupProxy = bridge.getGroupServiceProxy();
var postResult = groupProxy.listGroupsWithMember(profileId);
if (postResult.status == 200) {
// Success!
}
{
"service": "group",
"operation": "LIST_GROUPS_WITH_MEMBER",
"data": {
"profileId": "profileId"
}
}
JSON Response
{
"status": 200,
"data": {
"groups": [
{
"groupType": "test",
"groupId": "69191b48-0cb1-4538-9758-e2f5ef4c524b",
"isOpenGroup": false,
"requestingPendingMemberCount": 0,
"invitedPendingMemberCount": 0,
"ownerId": "b67b2d73-1e8c-42e9-9be5-9c1879a48555",
"name": "test22",
"memberCount": 1
}
]
}
}