Skip to content

mattermostbuilders PostBuilder

BigMakCode edited this page Aug 5, 2024 · 1 revision

PostBuilder Public class

Description

Mattermost post builder.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph Mattermost.Builders
  Mattermost.Builders.PostBuilder[[PostBuilder]]
  end
Loading

Members

Methods

Public methods

Returns Name
PostBuilder AddFile(string fileId)
Attach file to post by file identifier.
PostBuilder AddText(string text)
Set post text message.
PostBuilder ReplyToPostId(string rootPostId)
Reply to specified root post identifier.
Task<Post> SendMessageAsync()
Sent completed post to specified channel.
PostBuilder SetPriority(MessagePriority messagePriority)
Set post priority.
PostBuilder ToChannel(string channelId)
Send post to specified channel.

Details

Summary

Mattermost post builder.

Constructors

PostBuilder

internal PostBuilder(IMattermostClient client)
Arguments
Type Name Description
IMattermostClient client

Methods

ToChannel

public PostBuilder ToChannel(string channelId)
Arguments
Type Name Description
string channelId Channel identifier.
Summary

Send post to specified channel.

Returns

Current builder.

Exceptions
Name Description
ArgumentException If channel identifier is empty or null.

AddText

public PostBuilder AddText(string text)
Arguments
Type Name Description
string text Text message (markdown supported).
Summary

Set post text message.

Returns

Current builder.

ReplyToPostId

public PostBuilder ReplyToPostId(string rootPostId)
Arguments
Type Name Description
string rootPostId Post identifier.
Summary

Reply to specified root post identifier.

Returns

Current builder.

SetPriority

public PostBuilder SetPriority(MessagePriority messagePriority)
Arguments
Type Name Description
MessagePriority messagePriority Post priority.
Summary

Set post priority.

Returns

Current buidler.

AddFile

public PostBuilder AddFile(string fileId)
Arguments
Type Name Description
string fileId File identifier.
Summary

Attach file to post by file identifier.

Returns

Current builder.

Exceptions
Name Description
ArgumentNullException If file identifier is empty.

SendMessageAsync

public Task<Post> SendMessageAsync()
Summary

Sent completed post to specified channel.

Returns

Created post.

Exceptions
Name Description
ArgumentException

Generated with ModularDoc

Clone this wiki locally