特定のグループメンバーシップを取得します。このグループの管理者、または管理者レベルの権限を持つユーザーのみがこのAPIを使用できます。
グループメンバーシップオブジェクトを返します。
予期しないクライアントエラー。
curl -i -X GET "https://api.box.com/2.0/group_memberships/434534" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.memberships.getGroupMembershipById(groupMembership.id!);
client.memberships.get_group_membership_by_id(group_membership.id)
await client.Memberships.GetGroupMembershipByIdAsync(groupMembershipId: NullableUtils.Unwrap(groupMembership.Id));
BoxGroupMembership membership = new BoxGroupMembership(api, id);
BoxGroupMembership.Info groupMembershipInfo = membership.getInfo();
membership_id = '11111'
membership = client.group_membership(membership_id).get()
print(f'User "{membership.user.name}" is a member of the {membership.group.name} group')
client.groups.getMembership('33333')
.then(membership => {
/* membership -> {
type: 'group_membership',
id: '33333',
user:
{ type: 'user',
id: '22222',
name: 'Alison Wonderland',
login: 'alice@example.com' },
group: { type: 'group', id: '11111', name: 'Employees' },
role: 'member',
configurable_permissions:
{ can_run_reports: false,
can_instant_login: false,
can_create_accounts: false,
can_edit_accounts: false },
created_at: '2013-05-16T15:27:57-07:00',
modified_at: '2013-05-16T15:27:57-07:00' }
*/
});
client.groups.getMembershipInfo(membershipId: "12345") {
(result: Result<GroupMembership, BoxSDKError>) in
guard case let .success(membership) = result else {
print("Error retrieving group membership information")
return
}
print("Group Membership for group \(membership.group?.name) was retrieved")
}
{
"id": "11446498",
"type": "group_membership",
"created_at": "2012-12-12T10:53:43-08:00",
"group": {
"id": "11446498",
"type": "group",
"group_type": "managed_group",
"name": "Support"
},
"modified_at": "2012-12-12T10:53:43-08:00",
"role": "member",
"user": {
"id": "11446498",
"type": "user",
"login": "ceo@example.com",
"name": "Aaron Levie"
}
}