listMessages static method

Future<List> listMessages(
  1. String conversationId, {
  2. int from = 0,
  3. int to = 20,
})

Lists messages in [from, to) in conversation with id conversationId.

Implementation

static Future<List<Message>> listMessages(
  String conversationId, {
  int from = 0,
  int to = 20,
}) async {
  MercuryRequest req = await _req();
  req.conversation = Conversation(id: conversationId);
  req.from = from;
  req.to = to;

  MercuryResponse res = await _client.listMessages(req);
  return res.messages;
}