Documentation

Gets the messages from a topic.

Arguments

The circle ID, Topic you want to pull from, and any applicable filters on the messages you want.

Returns

Whether it was successful or failed, and the desired messages.

API Definition

public async Task<GetMessgesReply> GetMessges(GetMessgesRequest request)

C# Structures

public class GetMessagesRequest {

  public string CircleId;

  public string TopicId;

  public List<Int32> MsgTypeFilters;

}

public class GetMessagesReply 

{

  public ReturnStatus Status;

  public List<MessageInfo> Messages;

}

C# Example code:

public void GetMessages(string circleId, string topidId)

{

  GetMessgesRequest request = new GetMessgesRequest()

    {CircleId = circleId, TopicId = topidId, MsgTypeFilters = { 100 }}; // 100 = MarkupText

  GetMessgesReply reply = _circle.GetMessges(request);

  Console.WriteLine(reply.Status.Message);

  foreach (var msg in reply.Messages)

  {

    DateTime msgTime = new DateTime(1970, 1, 1).AddMilliseconds(msg.MessageTimeOffset);

    Console.WriteLine($"{msg.Message}");

  }

}