Documentation

Adds a message to a topic.

Arguments

The circle ID, which topic you want to add it to, the type and subtype of the message, the message itself, and additional optional information. 

Returns

Whether it succeeded or failed.

API Definition

public async Task<AddMessageReply> AddMessage(AddMessageRequest request)

C# Structures

  public class AddMessageRequest

{

  public string CircleId;

  public string TopicId;

  public int32 MessageType;

  public int32 MessageSubType;

  public string Message;

  public string Context;

  public string ObjectPath;

  public string Base64Data;

  public string AdditionalJson;

}

public class AddMessageReply

{

  public ReturnStatus Status;

  public MessageInfo Messages;

}

C# Example code:

public void AddMessage(string circleId, string topicId, string messageToAdd)

{

  AddMessgeRequest request = new AddMessgeRequest()

    {CircleId = circleId, TopicId = topicId, Message = messageToAdd, MessageType = 100}; // 100 = MarkupText

  AddMessgeReply reply = _circle.AddMessge(request);

  Console.WriteLine(reply.Status.Message);

}