グループのすべてのコラボレーションを取得します。会社のグループを調べるには、管理者権限が必要です。
それぞれのコラボレーションオブジェクトには、そのグループがどのファイルやフォルダにアクセスでき、どのロールが使用されるのかに関する詳細情報が含まれています。
コラボレーションオブジェクトのコレクションを返します。コラボレーションが存在しない場合は、空のコレクションが返されます。
予期しないクライアントエラー。
curl -X GET https://api.box.com/2.0/groups/57645/collaborations \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollection<BoxCollaboration> groupCollaborations = await client.GroupsManager
.GetCollaborationsForGroupAsync(groupId: "11111");
BoxGroup group = new BoxGroup(api, "id");
group.getCollaborations();
collaborations = client.group(group_id='11111').get_collaborations()
for collaboration in collaborations:
print('The group is collaborated on {0} {1}'.format(collaboration.item.type, collaboration.item.id))
client.groups.getCollaborations('11111')
.then(collaborations => {
/* collaborations -> {
total_count: 1,
entries:
[ { type: 'collaboration',
id: '22222',
created_by:
{ type: 'user',
id: '33333',
name: 'Example User',
login: 'user@example.com' },
created_at: '2013-11-14T16:16:20-08:00',
modified_at: '2013-11-14T16:16:20-08:00',
expires_at: null,
status: 'accepted',
accessible_by:
{ type: 'group',
id: '11111',
name: 'Remote Employees' },
role: 'viewer',
acknowledged_at: '2013-11-14T16:16:20-08:00',
item:
{ type: 'folder',
id: '44444',
sequence_id: '0',
etag: '0',
name: 'Documents' } } ],
offset: 0,
limit: 100 }
*/
});
client.groups.listCollaborations(groupId: "12345") { results in
switch results {
case let .success(iterator):
for i in 1 ... 10 {
iterator.next { (result in
switch result {
case let .success(collaboration):
print("Collaboration with ID \(collaboration.id) was retrieved")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}