listParticipantEvents method

Future<ListParticipantEventsResponse> listParticipantEvents({
  1. required String participantId,
  2. required String sessionId,
  3. required String stageArn,
  4. int? maxResults,
  5. String? nextToken,
})

Lists events for a specified participant that occurred during a specified stage session.

May throw AccessDeniedException. May throw ValidationException.

Parameter participantId : Unique identifier for this participant. This is assigned by IVS and returned by CreateParticipantToken.

Parameter sessionId : ID of a session within the stage.

Parameter stageArn : Stage ARN.

Parameter maxResults : Maximum number of results to return. Default: 50.

Parameter nextToken : The first participant event to retrieve. This is used for pagination; see the nextToken response field.

Implementation

Future<ListParticipantEventsResponse> listParticipantEvents({
  required String participantId,
  required String sessionId,
  required String stageArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    'participantId': participantId,
    'sessionId': sessionId,
    'stageArn': stageArn,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListParticipantEvents',
    exceptionFnMap: _exceptionFns,
  );
  return ListParticipantEventsResponse.fromJson(response);
}