setReadMarker method

Future<DynamiteResponse<ChatSetReadMarkerResponseApplicationJson, ChatChatSetReadMarkerHeaders>> setReadMarker({
  1. required String token,
  2. int? lastReadMessage,
  3. ChatSetReadMarkerApiVersion? apiVersion,
  4. bool? oCSAPIRequest,
})

Set the read marker to a specific message.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • lastReadMessage ID if the last read message (Optional only with chat-read-last capability).
  • apiVersion Defaults to "v1".
  • token
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Read marker set successfully

See:

Implementation

Future<_i1.DynamiteResponse<ChatSetReadMarkerResponseApplicationJson, ChatChatSetReadMarkerHeaders>> setReadMarker({
  required String token,
  int? lastReadMessage,
  ChatSetReadMarkerApiVersion? apiVersion,
  bool? oCSAPIRequest,
}) async {
  final _request = $setReadMarker_Request(
    token: token,
    lastReadMessage: lastReadMessage,
    apiVersion: apiVersion,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _response = await _rootClient.httpClient.send(_request);

  final _serializer = $setReadMarker_Serializer();
  final _rawResponse =
      await _i1.ResponseConverter<ChatSetReadMarkerResponseApplicationJson, ChatChatSetReadMarkerHeaders>(_serializer)
          .convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}