Skip to main content
Version: 5.15.0

Member.Get

public BackendGroupMemberReturnObject Get(string groupName, int limit, LastEvaluatedKey lastEvaluatedKey);
public BackendGroupMemberReturnObject Get(string groupName, int limit);
public BackendGroupMemberReturnObject Get(string groupName);

Parameters

ValueTypeDescription
groupUuidstringName of group to load
limitintNumber of users to load (default = 10)
lastEvaluatedKeyLastEvaluatedKeyWhen trying to load more groups than the 'limit', the following groups can be loaded through bro.GetLastEvaluatedKey().

Description

Loads the information of the group your are currently in.

  • This method cannot be called via SendQueue.

BackendGroupMemberReturnObject

namespace BackEnd.Group
{
public class GroupMemberItem
{
public readonly string lastLoginDate = string.Empty;
public readonly string inDate = string.Empty;
public readonly string nickname = string.Empty;
}

public class BackendMyGroupReturnObject : BackendReturnObject
{
public long GetUserCount();
public string GetGroupName();
public List<GroupMemberItem> GetGroupMemberList();

}
}

Example

Synchronous

BackEnd.Group.BackendGroupReturnObject tableBro = Backend.Group.Table.Get();
string groupName = tableBro.GetGroupList()[0].groupName;

BackEnd.Group.BackendGroupMemberReturnObject bro = Backend.Group.Member.Get(groupName);

if(bro.IsSuccess()) {
List<BackEnd.Group.GroupMemberItem> groupMemberItem = bro.GetGroupMemberList();

Debug.Log(bro.GetGroupName());
Debug.Log(bro.GetUserCount());

foreach (BackEnd.Group.GroupMemberItem item in groupMemberItem)
{
Debug.Log(item.ToString());
}
}

// When attempting to call more users
if(bro.GetLastEvaluatedKey() != null) {
BackEnd.Group.BackendGroupMemberReturnObject bro2 = Backend.Group.Member.Get(groupName, 10, bro.GetLastEvaluatedKey());

if(bro2.IsSuccess()) {

foreach (BackEnd.Group.GroupMemberItem in bro2.GetGroupMemberList)
{
Debug.Log(item.ToString());
}
}
}

Asynchronous

Backend.Group.Member.Get("groupName", 10, callback => {

if(callback.GetLastEvaluatedKey() != null) {
Backend.Group.Member.Get("groupName", 10, callback.GetLastEvaluatedKey(), callback2 => {
Debug.Log(callback2);
});
}
});

ReturnCase

Success cases

When loaded successfully
StatusCode : 200
Message : Success
ReturnValue : refer to GetReturnValuetoJSON

Error cases

When the group's name is null or string.Empty StatusCode : 400
ErrorCode : ValidationException
Message : groupName is null or string.Empty

When the group does not exist StatusCode : 404
ErrorCode : NotFoundException
Message : group not exist

GetReturnValuetoJSON

{
"rows": [
{
"lastLoginDate": "2024-08-14T06:35:03.871Z",
"inDate": "2024-08-14T06:17:53.290Z",
"nickname": ""
},
{
"lastLoginDate": "2024-08-08T07:24:01.850Z",
"inDate": "2024-08-08T07:24:01.850Z",
"nickname": "user1"
},
{
"lastLoginDate": "2024-08-08T05:19:02.793Z",
"inDate": "2024-08-08T05:19:02.793Z",
"nickname": "user2"
}
],
"summary": {
"userCount" : 100,
"groupName" : "Group name"
},
"LastEvaluatedKey": {
"gamer_id": {
"S": "01912b69-0890-7fdc-bb12-1710833fb558"
},
"inDate": {
"S": "Group name"#user#2024-06-18T09:26:03.850Z#c8a47aa0-2d54-11ef-9eb4-01759d9a8cf5"
}
}
}