putEvents method
Future<PutEventsResponse>
putEvents({
- required String applicationId,
- required EventsRequest eventsRequest,
Creates a new event to record for endpoints, or creates or updates endpoint data that existing events are associated with.
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<PutEventsResponse> putEvents({
required String applicationId,
required EventsRequest eventsRequest,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(eventsRequest, 'eventsRequest');
final response = await _protocol.sendRaw(
payload: eventsRequest,
method: 'POST',
requestUri: '/v1/apps/${Uri.encodeComponent(applicationId)}/events',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return PutEventsResponse(
eventsResponse: EventsResponse.fromJson($json),
);
}