ChatterGroups クラス
名前空間
ChatterGroups のメソッド
addMember(communityId, groupId, userId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMember addMember(String communityId, String groupId, String userId)
パラメーター
戻り値
使用方法
addMemberWithRole(communityId, groupId, userId, role)
API バージョン
29.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMember addMemberWithRole(String communityId, String groupId, String userId, ConnectApi.GroupMembershipType role)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- userId
- 型: String
- ユーザーの ID。
- role
- 型: ConnectApi.GroupMembershipType
- グループメンバーシップの種別。次のいずれかの値になります。
- GroupManager
- StandardMember
戻り値
使用方法
addRecord(communityId, groupId, recordId)
API バージョン
34.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupRecord addRecord(String communityId, String groupId, String recordId)
パラメーター
戻り値
createGroup(communityId, groupInput)
API バージョン
29.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupDetail createGroup(String, communityId, ConnectApi.ChatterGroupInput groupInput)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupInput
- 型: ConnectApi.ChatterGroupInput
- グループのプロパティ。
deleteBannerPhoto(communityId, groupId)
API バージョン
36.0
Chatter が必要かどうか
はい
署名
public static Void deleteBannerPhoto(String communityId, String groupId)
パラメーター
戻り値
型: Void
使用方法
deleteMember(communityId, membershipId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static Void deleteMember(String communityId, String membershipId)
パラメーター
戻り値
型: Void
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
deletePhoto(communityId, groupId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static Void deletePhoto(String communityId, String groupId)
パラメーター
戻り値
型: Void
使用方法
このメソッドは、コンテキストユーザーがグループ管理者または所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
getAnnouncements(communityId, groupId)
API バージョン
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.AnnouncementPage getAnnouncements(String communityId, String groupId)
パラメーター
戻り値
使用方法
お知らせの投稿、お知らせに関する情報の取得、お知らせの表示期限の更新、またはお知らせの削除を行うには、ConnectApi.Announcements クラスのメソッドを使用します。
getAnnouncements(communityId, groupId, pageParam, pageSize)
API バージョン
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.AnnouncementPage getAnnouncements(String communityId, String groupId, Integer pageParam, Integer pageSize)
パラメーター
戻り値
使用方法
お知らせの投稿、お知らせに関する情報の取得、お知らせの表示期限の更新、またはお知らせの削除を行うには、ConnectApi.Announcements クラスのメソッドを使用します。
getBannerPhoto(communityId, groupId)
API バージョン
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BannerPhoto getBannerPhoto(String communityId, String groupId)
パラメーター
戻り値
getGroup(communityId, groupId)
API バージョン
28.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupDetail getGroup(String communityId, String groupId)
パラメーター
getGroupBatch(communityId, groupIds)
API バージョン
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BatchResult[] getGroupBatch(String communityId, List<String> groupIds)
パラメーター
戻り値
ConnectApi.BatchResult.getResult() メソッドは、読み込まれなかったグループの結果に含まれる ConnectApi.ChatterGroup オブジェクトとエラーを返します。
例
1// Create a list of groups.
2ConnectApi.ChatterGroupPage groupPage = ConnectApi.ChatterGroups.getGroups(null);
3
4// Create a list of group IDs.
5List<String> groupIds = new List<String>();
6for (ConnectApi.ChatterGroup aGroup : groupPage.groups){
7 groupIds.add(aGroup.id);
8}
9
10// Get info about all the groups in the list.
11ConnectApi.BatchResult[] batchResults = ConnectApi.ChatterGroups.getGroupBatch(null, groupIds);
12
13for (ConnectApi.BatchResult batchResult : batchResults) {
14 if (batchResult.isSuccess()) {
15 // Operation was successful.
16 // Print the number of members in each group.
17 ConnectApi.ChatterGroup aGroup;
18 if(batchResult.getResult() instanceof ConnectApi.ChatterGroup) {
19 aGroup = (ConnectApi.ChatterGroup) batchResult.getResult();
20 }
21 System.debug('SUCCESS');
22 System.debug(aGroup.memberCount);
23 }
24 else {
25 // Operation failed. Print errors.
26 System.debug('FAILURE');
27 System.debug(batchResult.getErrorMessage());
28 }
29}getGroupMembershipRequest(communityId, requestId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMembershipRequest getGroupMembershipRequest(String communityId, String requestId)
パラメーター
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
getGroupMembershipRequests(communityId, groupId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMembershipRequests getGroupMembershipRequests(String communityId, String groupId)
パラメーター
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
getGroupMembershipRequests(communityId, groupId, status)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMembershipRequests getGroupMembershipRequests(String communityId, String groupId, ConnectApi.GroupMembershipRequestStatus status)
パラメーター
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
getGroups(communityId)
API バージョン
28.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupPage getGroups(String communityId)
パラメーター
- communityId
- 型: String
- Experience Cloud サイト�� ID、internal、または null。
getGroups(communityId, pageParam, pageSize)
API バージョン
28.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupPage getGroups(String communityId, Integer pageParam, Integer pageSize)
パラメーター
getGroups(communityId, pageParam, pageSize, archiveStatus)
API バージョン
29.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupPage getGroups(String communityId, Integer pageParam, Integer pageSize, ConnectApi.GroupArchiveStatus archiveStatus)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- pageParam
- 型: Integer
- 返すページの数。0 から開始します。null または 0 を渡すと、最初のページが返されます。
- pageSize
- 型: Integer
- ページあたりの項目数を指定します。有効な値は 1 ~ 100 です。null を渡すと、デフォルトサイズの 25 に設定されます。
- archiveStatus
- 型: ConnectApi.GroupArchiveStatus
- グループのアーカイブ状況。
- All — アーカイブ対象かどうかに関係なく、すべてのグループ。
- Archived — アーカイブ対象のグループ。
- NotArchived — アーカイブ対象外のグループのみ。
- null を渡すと、デフォルト値の All が使用されます。
getMember(communityId, membershipId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMember getMember(String communityId, String membershipId)
パラメーター
戻り値
getMembers(communityId, groupId)
API バージョン
28.0
ゲストユーザーが使用可能
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMemberPage getMembers(String communityId, String groupId)
パラメーター
戻り値
getMembers(communityId, groupId, pageParam, pageSize)
API バージョン
28.0
ゲストユーザーが使用可能
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMemberPage getMembers(String communityId, String groupId, Integer pageParam, Integer pageSize)
パラメーター
戻り値
getMembershipBatch(communityId, membershipIds)
API バージョン
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BatchResult[] getMembershipBatch(String communityId, List<String> membershipIds)
パラメーター
戻り値
ConnectApi.BatchResult.getResult() メソッドは、読み��まれなかったグループの結果に含まれる ConnectApi.GroupMember オブジェクトとエラーを返します。
例
1// Get members of a group.
2ConnectApi.GroupMemberPage membersPage = ConnectApi.ChatterGroups.getMembers(null, '0F9D00000000oOT');
3
4// Create a list of membership IDs.
5List<String> membersList = new List<String>();
6for (ConnectApi.GroupMember groupMember : membersPage.members){
7 membersList.add(groupMember.id);
8}
9
10// Get info about all group memberships in the list.
11ConnectApi.BatchResult[] batchResults = ConnectApi.ChatterGroups.getMembershipBatch(null, membersList);
12
13for (ConnectApi.BatchResult batchResult : batchResults) {
14 if (batchResult.isSuccess()) {
15 // Operation was successful.
16 // Print the first name of each member.
17 ConnectApi.GroupMember groupMember;
18 if(batchResult.getResult() instanceof ConnectApi.GroupMember) {
19 groupMember = (ConnectApi.GroupMember) batchResult.getResult();
20 }
21 System.debug('SUCCESS');
22 System.debug(groupMember.user.firstName);
23 }
24 else {
25 // Operation failed. Print errors.
26 System.debug('FAILURE');
27 System.debug(batchResult.getErrorMessage());
28 }
29}getMyChatterSettings(communityId, groupId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupChatterSettings getMyChatterSettings(String communityId, String groupId)
パラメーター
getPhoto(communityId, groupId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Photo getPhoto(String communityId, String groupId)
パラメーター
戻り値
getRecord(communityId, groupRecordId)
API バージョン
34.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupRecord getRecord(String communityId, String groupRecordId)
パラメーター
戻り値
getRecords(communityId, groupId)
API バージョン
33.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupRecordPage getRecords(String communityId, String groupId)
パラメーター
戻り値
getRecords(communityId, groupId, pageParam, pageSize)
API バージョン
33.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupRecordPage getRecords(String communityId, String groupId, Integer pageParam, Integer pageSize)
パラメーター
戻り値
inviteUsers(groupId, invite)
API バージョン
39.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Invitations inviteUsers(String groupId, ConnectApi.InviteInput invite)
パラメーター
- groupId
- 型: String
- グループの ID。
- invite
- 型: ConnectApi.InviteInput
- ConnectApi.InviteInput 本文。
戻り値
postAnnouncement(communityId, groupId, announcement)
API バージョン
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Announcement postAnnouncement(String communityId, String groupId, ConnectApi.AnnouncementInput announcement)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- announcement
- 型: ConnectApi.AnnouncementInput
- ConnectApi.AnnouncementInput オブジェクト。
戻り値
使用方法
お知らせは、情報を強調表示するために使用します。ユーザーは、お知らせに対するディスカッション、いいね!、コメントの投稿ができます。フィード投稿を削除するとお知らせが削除されます。
お知らせの投稿、お知らせに関する情報の取得、お知らせの表示期限の更新、またはお知らせの削除を行うには、ConnectApi.Announcements クラスのメソッドを使用します。
requestGroupMembership(communityId, groupId)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMembershipRequest requestGroupMembership(String communityId, String groupId)
パラメーター
サンプル: 非公開グループへの参加要求
このサンプルコードは ConnectApi.ChatterGroups.requestGroupMembership をコールして非公開グループへ��参加要求を行います。
1String communityId = null;
2ID groupId = '0F9x00000000hAZ';
3
4ConnectApi.GroupMembershipRequest membershipRequest = ConnectApi.ChatterGroups.requestGroupMembership(communityId, groupId);searchGroups(communityId, q)
API バージョン
28.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupPage searchGroups(String communityId, String q)
パラメーター
使用方法
searchGroups(communityId, q, pageParam, pageSize)
API バージョン
28.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupPage searchGroups(String communityId, String q, Integer pageParam, Integer pageSize)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- q
- 型: String
- 検索する文字列を指定します。検索文字列にはワイルドカード文字を除いて 2 文字以上が含まれている必要があります。「ワイルドカード」を参照してください。null を指定できます。
- pageParam
- 型: Integer
- 返すページの数。0 から開始します。null または 0 を渡すと、最初のページが返されます。
- pageSize
- 型: Integer
- ページあたりの項目数を指定します。有効な値は 1 ~ 100 です。null を渡すと、デフォルトサイズの 25 に設定されます。
使用方法
searchGroups(communityId, q, archiveStatus, pageParam, pageSize)
API バージョン
29.0
ゲストユーザーが使用可能
31.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroupPage searchGroups(String communityId, String q, ConnectApi.GroupArchiveStatus archiveStatus, Integer pageParam, Integer pageSize)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- q
- 型: String
- 検索する文字列を指定します。検索文字列にはワイルドカード文字を除いて 2 文字以上が含まれている必要があります。「ワイルドカード」を参照してください。null を指定できます。
- archiveStatus
- 型: ConnectApi.GroupArchiveStatus
- グループのアーカイブ状況。
- All — アーカイブ対象かどうかに関係なく、すべてのグループ。
- Archived — アーカイブ対象のグループ。
- NotArchived — アーカイブ対象外のグループのみ。
- pageParam
- 型: Integer
- 返すページの数。0 から開始します。null または 0 を渡すと、最初のページが返されます。
- pageSize
- 型: Integer
- ページあたりの項目数を指定します。有効な値は 1 ~ 100 です。null を渡すと、デフォルトサイズの 25 に設定されます。
使用方法
setBannerPhoto(communityId, groupId, fileId, versionNumber)
API バージョン
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BannerPhoto setBannerPhoto(String communityId, String groupId, String fileId, Integer versionNumber)
パラメーター
戻り値
使用方法
写真は非同期に処理され、すぐには表示されない場合があります。
setBannerPhoto(communityId, groupId, fileUpload)
API バージョン
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BannerPhoto setBannerPhoto(String communityId, String groupId, ConnectApi.BinaryInput fileUpload)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- fileUpload
- 型: ConnectApi.BinaryInput
- 写真として使用するファイル。画像として使用できるコンテンツタイプである必要があります。
戻り値
使用方法
写真は非同期に処理され、すぐには表示されない場合があります。
setBannerPhotoWithAttributes(communityId, groupId, bannerPhoto)
API バージョン
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BannerPhoto setBannerPhotoWithAttributes(String communityId, String groupId, ConnectApi.BannerPhotoInput bannerPhoto)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- bannerPhoto
- 型: ConnectApi.BannerPhotoInput
- ファイルの ID とバージョン、およびファイルのトリミング方法を指定する ConnectApi.BannerPhotoInput オブジェクト。
戻り値
使用方法
写真は非同期に処理され、すぐには表示されない場合があります。
setBannerPhotoWithAttributes(communityId, groupId, bannerPhoto, fileUpload)
API バージョン
36.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.BannerPhoto setBannerPhotoWithAttributes(String communityId, String groupId, ConnectApi.BannerPhotoInput bannerPhoto, ConnectApi.BinaryInput fileUpload)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- bannerPhoto
- 型: ConnectApi.BannerPhotoInput
- トリミングパラメーターを指定する ConnectApi.BannerPhotoInput オブジェクト。
- fileUpload
- 型: ConnectApi.BinaryInput
- 写真として使用するファイル。画像として使用できるコンテンツタイプである必要があります。
戻り値
使用方法
写真は非同期に処理され、すぐには表示されない場合があります。
setPhoto(communityId, groupId, fileId, versionNumber)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Photo setPhoto(String communityId, String groupId, String fileId, Integer versionNumber)
パラメーター
戻り値
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
写真は非同期に処理され、すぐには表示されない場合があります。
サンプル: 既存ファイルを使用したグループ写真の更新
グループを作成した時点では、グループ写真は含まれていません。Salesforce にすでにアップロードされている既存の写真をグループ写真として設定できます。キープレフィックスは 069、ファイルサイズは 2 GB 未満にする必要があります。
1String communityId = null;
2ID groupId = '0F9x00000000hAK';
3ID fileId = '069x00000001Ion';
4
5// Set photo
6ConnectApi.Photo photo = ConnectApi.ChatterGroups.setPhoto(communityId, groupId, fileId, null);setPhoto(communityId, groupId, fileUpload)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Photo setPhoto(String communityId, String groupId, ConnectApi.BinaryInput fileUpload)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- fileUpload
- 型: ConnectApi.BinaryInput
- 写真として使用するファイル。画像として使用できるコンテンツタイプである必要があります。
戻り値
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
写真は非同期に処理され、すぐには表示されない場合があります。
サンプル: 新しいファイルをアップロードしてグループ写真として使用する
グループを作成した時点では、グループ写真は含まれていません。写真をアップロードし、グループ写真としてそれを設定できます。
1String communityId = null;
2ID groupId = '0F9x00000000hAP';
3ID photoId = '069x00000001Ioo';
4
5// Set photo
6List<ContentVersion> groupPhoto = [Select c.VersionData From ContentVersion c where ContentDocumentId=:photoId];
7ConnectApi.BinaryInput binary = new ConnectApi.BinaryInput(groupPhoto.get(0).VersionData, 'image/png', 'image.png');
8ConnectApi.Photo photo = ConnectApi.ChatterGroups.setPhoto(communityId, groupId, binary);setPhotoWithAttributes(communityId, groupId, photo)
API バージョン
29.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Photo setPhotoWithAttributes(String communityId, String groupId, ConnectApi.PhotoInput photo)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- photo
- 型: ConnectApi.PhotoInput
- ファイルの ID とバージョン、およびファイルのトリミング方法を指定する ConnectApi.PhotoInput オブジェクト。
戻り値
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
写真は非同期に処理され、すぐには表示されない場合があります。
setPhotoWithAttributes(communityId, groupId, photo, fileUpload)
API バージョン
29.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.Photo setPhotoWithAttributes(String communityId, String groupId, ConnectApi.PhotoInput photo, ConnectApi.BinaryInput fileUpload)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- photo
- 型: ConnectApi.PhotoInput
- fileUpload で指定されたファイルのトリミング方法を指定する ConnectApi.PhotoInput オブジェクト。
- fileUpload
- 型: ConnectApi.BinaryInput
- 写真として使用するファイル。画像として使用できるコンテンツタイプである必要があります。
戻り値
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
写真は非同期に処理され、すぐには表示されない場合があります。
updateGroup(communityId, groupId, groupInput)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroup updateGroup(String communityId, String groupId, ConnectApi.ChatterGroupInput groupInput)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- groupInput
- 型: ConnectApi.ChatterGroupInput
- ConnectApi.ChatterGroupInput オブジェクト。
戻り値
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。このメソッドを使用して、ConnectApi.ChatterGroupInput クラスの設定を更新します。これらの設定には、グループが公開されているか非公開であるか、グループがアーカイブされているかどうかに関わらず、[情報] セクションのグループタイトルとテキストが含まれます。
例
1String groupId = '0F9D00000000qSz';
2String communityId = null;
3
4ConnectApi.ChatterGroupInput groupInput = new ConnectApi.ChatterGroupInput();
5groupInput.isArchived = true;
6
7ConnectApi.ChatterGroups.updateGroup(communityId, groupId, groupInput);updateGroupMember(communityId, membershipId, role)
API バージョン
29.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.ChatterGroup updateGroupMember(String communityId, String membershipId, ConnectApi.GroupMembershipType role)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- membershipId
- 型: String
- メンバーシップの ID。
- role
- 型: ConnectApi.GroupMembershipType
- グループメンバーシップの種別。次のいずれかの値になります。
- GroupManager
- StandardMember
戻り値
使用方法
updateMyChatterSettings(communityId, groupId, emailFrequency)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupChatterSettings updateMyChatterSettings(String communityId, String groupId, ConnectApi.GroupEmailFrequency emailFrequency)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- groupId
- 型: String
- グループの ID。
- emailFrequency
- 型: ConnectApi.GroupEmailFrequency
- ユーザーがメールを受信する頻度。
- EachPost
- DailyDigest
- WeeklyDigest
- Never
- UseDefault
値 UseDefault には、updateChatterSettings(communityId, userId, defaultGroupEmailFrequency) へのコールで設定された値が使用されます。
updateRequestStatus(communityId, requestId, status)
API バージョン
28.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMembershipRequest updateRequestStatus(String communityId, String requestId, ConnectApi.GroupMembershipRequestStatus status)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- requestId
- 型: String
- 非公開グループへの参加要求の ID。
- status
- 型: ConnectApi.GroupMembershipRequestStatus
- 要求の状況:
- Accepted
- Declined
このメソッドでは、Pending 値に列挙は使用できません。
使用方法
このメソッドは、コンテキストユーザーがグループマネージャーまたは所有者であるか、「すべてのデータの編集」権限を持っている場合にのみ正常に実行されます。
サンプル: 非公開グループへの参加要求の受諾または拒否
このサンプルコードは ConnectApi.ChatterGroups.updateRequestStatus をコールし、それをメンバーシップ要求 ID と ConnectApi.GroupMembershipRequestStatus.Accepted 状況を渡します。また、ConnectApi.GroupMembershipRequestStatus.Declined を渡すこともできます。
1String communityId = null;
2ID groupId = '0F9x00000000hAZ';
3String requestId = '0I5x000000001snCAA';
4
5ConnectApi.GroupMembershipRequest membershipRequestRep = ConnectApi.ChatterGroups.updateRequestStatus(communityId, requestId,
6ConnectApi.GroupMembershipRequestStatus.Accepted);updateRequestStatus(communityId, requestId, status, responseMessage)
API バージョン
35.0
Chatter が必要かどうか
はい
署名
public static ConnectApi.GroupMembershipRequest updateRequestStatus(String communityId, String requestId, ConnectApi.GroupMembershipRequestStatus status, String responseMessage)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- requestId
- 型: String
- 非公開グループへの参加要求の ID。
- status
- 型: ConnectApi.GroupMembershipRequestStatus
- 要求の状況:
- Accepted
- Declined
このメソッドでは、Pending 値に列挙は使用できません。
- responseMessage
- 型: String
- メンバーシップ要求が却下された場合にユーザーに表示するメッセージを指定します。このプロパティの値は、status プロパティの値が Declined の場合にのみ使用されます。
最大文字数は 756 文字です。
使用方法
ChatterGroups テストメソッド
これらのメソッドを使用して ConnectApi コードをテストする方法の詳細は、「ConnectApi コードのテスト」を参照してください。
setTestSearchGroups(communityId, q, result)
API バージョン
29.0
署名
public static Void setTestSearchGroups(String communityId, String q, ConnectApi.ChatterGroupPage result)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- q
- 型: String
- 検��する文字列を指定します。検索文字列にはワイルドカード文字を除いて 2 文字以上が含まれている必要があります。「ワイルドカード」を参照してください。null を指定できます。
- result
- 型: ConnectApi.ChatterGroupPage
- テスト ConnectApi.ChatterGroupPage オブジェクト。
戻り値
型: Void
setTestSearchGroups(communityId, q, pageParam, pageSize, result)
API バージョン
28.0
署名
public static Void setTestSearchGroups(String communityId, String q, Integer pageParam, Integer pageSize, ConnectApi.ChatterGroupPage result)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- q
- 型: String
- 検索する文字列を指定します。検索文字列にはワイルドカード文字を除いて 2 文字以上が含まれている必要があります。「ワイルドカード」を参照してください。null を指定できます。
- pageParam
- 型: Integer
- 返すページの数。0 から開始します。null または 0 を渡すと、最初のページが返され���す。
- pageSize
- 型: Integer
- ページあたりの項目数を指定します。有効な値は 1 ~ 100 です。null を渡すと、デフォルトサイズの 25 に設定されます。
- result
- 型: ConnectApi.ChatterGroupPage
- テスト ConnectApi.ChatterGroupPage オブジェクト。
戻り値
型: Void
setTestSearchGroups(communityId, q, archiveStatus, pageParam, pageSize, result)
API バージョン
29.0
署名
public static Void setTestSearchGroups(String communityId, String q, ConnectApi.GroupArchiveStatus, archiveStatus, Integer pageParam, Integer pageSize, ConnectApi.ChatterGroupPage result)
パラメーター
- communityId
- 型: String
- Experience Cloud サイトの ID、internal、または null。
- q
- 型: String
- 検索する文字列を指定します。検索文字列にはワイルドカード文字を除いて 2 文字以上が含まれている必要があります。「ワイルドカード」を参照してください。null を指定できます。
- archiveStatus
- 型: ConnectApi.GroupArchiveStatus
- グループのアーカイブ状況。
- All — アーカイブ対象かどうかに関係なく、すべてのグループ。
- Archived — アーカイブ対象のグループ。
- NotArchived — アーカイブ対象外のグループのみ。
- pageParam
- 型: Integer
- 返すページの数。0 から開始します。null または 0 を渡すと、最初のページが返されます。
- pageSize
- 型: Integer
- ページあたりの項目数を指定します。有効な値は 1 ~ 100 です。null を渡すと、デフォルトサイズの 25 に設定されます。
- result
- 型: ConnectApi.ChatterGroupPage
- テスト ConnectApi.ChatterGroupPage オブジェクト。
戻り値
型: Void