sendUsersMessages method
Future<SendUsersMessagesResponse>
sendUsersMessages({
- required String applicationId,
- required SendUsersMessageRequest sendUsersMessageRequest,
Creates and sends a message to a list of users.
May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.
Parameter applicationId
:
The unique identifier for the application. This identifier is displayed as
the Project ID on the Amazon Pinpoint console.
Implementation
Future<SendUsersMessagesResponse> sendUsersMessages({
required String applicationId,
required SendUsersMessageRequest sendUsersMessageRequest,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(
sendUsersMessageRequest, 'sendUsersMessageRequest');
final response = await _protocol.sendRaw(
payload: sendUsersMessageRequest,
method: 'POST',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/users-messages',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return SendUsersMessagesResponse(
sendUsersMessageResponse: SendUsersMessageResponse.fromJson($json),
);
}