getChannelMembershipPreferences method
Gets the membership preferences of an AppInstanceUser or
AppInstanceBot for the specified channel. A user or a bot
must be a member of the channel and own the membership in order to
retrieve membership preferences. Users or bots in the
AppInstanceAdmin and channel moderator roles can't retrieve
preferences for other users or bots. Banned users or bots can't retrieve
membership preferences for the channel from which they are banned.
May throw BadRequestException.
May throw ForbiddenException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter channelArn :
The ARN of the channel.
Parameter chimeBearer :
The ARN of the AppInstanceUser or AppInstanceBot
that makes the API call.
Parameter memberArn :
The AppInstanceUserArn of the member retrieving the
preferences.
Implementation
Future<GetChannelMembershipPreferencesResponse>
getChannelMembershipPreferences({
required String channelArn,
required String chimeBearer,
required String memberArn,
}) async {
final headers = <String, String>{
'x-amz-chime-bearer': chimeBearer.toString(),
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/channels/${Uri.encodeComponent(channelArn)}/memberships/${Uri.encodeComponent(memberArn)}/preferences',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return GetChannelMembershipPreferencesResponse.fromJson(response);
}