このユーザーに関連する保留中のコラボレーション招待をすべて取得します。
id,type,name
応答に含める属性のカンマ区切りリスト。このパラメータを使用すると、標準の応答には通常含まれないフィールドをリクエストできます。
このパラメータを指定すると、明示的に指定しない限り標準フィールドは応答に含まれず、リクエストしたフィールドのほかには、簡易版レプリゼンテーションのフィールドしか返されないことに注意してください。
1000
1000
返す項目の1ページあたりの最大数。
1000
0
応答が開始される項目のオフセット。
pending
次の値に固定: pending
保留中のコラボレーションオブジェクトのコレクションを返します。
ユーザーに保留中のコラボレーションがない場合、このコレクションは空になります。
予期しないクライアントエラー。
curl -X GET https://api.box.com/2.0/collaborations?status=pending \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollection<BoxCollaboration> pendingCollabs = await CollaborationsManager
.GetPendingCollaborationAsync();
Collection<BoxCollaboration.Info> pendingCollaborations =
BoxCollaboration.getPendingCollaborations(api);
pending_collaborations = client.get_pending_collaborations()
for pending_collaboration in pending_collaborations:
print('Collaboration {0} is pending'.format(pending_collaboration.id))
client.collaborations.getPending()
.then(collaborations => {
/* collaborations -> {
total_count: 1,
entries: [
{
type: 'collaboration',
id: '11111',
created_by: {
type: 'user',
id: '22222',
name: 'Example User',
login: 'user@example.com'
},
created_at: '2011-11-29T12:56:35-08:00',
modified_at: '2012-09-11T15:12:32-07:00',
expires_at: null,
status: 'pending',
accessible_by: {
type: 'user',
id: '33333',
name: 'Collaborator User',
login: 'collaborator@example.com'
},
role: 'editor',
acknowledged_at: '2011-11-29T12:59:40-08:00',
item: null
}
]
}
*/
});
client.collaborations.listPendingForEnterprise() { 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 created by \(collaboration.createdBy?.name)")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}