Skip to content

More api methods#5

Merged
bvdcode merged 22 commits intobvdcode:developfrom
sidezzz:MoreApiMethods
Feb 21, 2025
Merged

More api methods#5
bvdcode merged 22 commits intobvdcode:developfrom
sidezzz:MoreApiMethods

Conversation

@sidezzz
Copy link
Copy Markdown

@sidezzz sidezzz commented Feb 17, 2025

This PR adds "props" property to create and update posts api, implements new api for GetPostsForChannel, allows to upload fire by using Stream object

bvdcode and others added 21 commits August 13, 2024 03:40
Cleaned up `IMattermostClientExtensions.cs` by removing the `MattermostClientExtensions` class, its namespace, and unused using directives. Streamlined `FileDetails.cs` by removing unnecessary using directives and relocating the `FileResponse` class. Moved the `FileResponse` class to a new file (`FileResponse.cs`) with appropriate using directives and namespace for better organization.
Updated README.md example to use new MattermostClient login method.
Updated package references in Mattermost.Tests.csproj and Mattermost.csproj.
Refactored imports and namespaces in various files for better organization.
Removed handling of the Unknown event in MattermostClient.cs.
Added OnEventReceived event in MattermostClient class, triggered on any event reception. Implemented its invocation in HandleResponseAsync with exception handling. Modified Json property in WebsocketMessage to return "{}" when Data is null or whitespace. Introduced WebSocketEventArgs class in Mattermost.Events namespace to encapsulate WebSocket event data.
The target framework for the `Mattermost.ConsoleTest.csproj` and
`Mattermost.Tests.csproj` projects has been updated from .NET 8.0
to .NET 9.0. This change is reflected by modifying the
`<TargetFramework>` element in both project files.

+semver: major
Added XML documentation comments to the MattermostEvent enum and its members in MattermostEvent.cs. This includes a summary for the enum itself and each member, explaining the event types they represent. Removed the #pragma warning disable CS1591 directive to enable warnings for missing XML comments.
README.md reorganized for clarity: removed "Getting Started," updated "Installation," split "Usage" into subsections, and added examples for client methods.

IMattermostClient.cs: added `CreatePostAsync`, marked `SendMessageAsync` as obsolete.

MattermostClient.cs: `SendMessageAsync` now calls `CreatePostAsync` and is marked obsolete.
The method signature for `CreatePostAsync` in the `IMattermostClient`
interface has been removed. This method was responsible for creating
a post in a specified channel with optional parameters for message
text, reply-to post ID, message priority, and attached files.
Replaced SendMessageAsync with CreatePostAsync across multiple files:
- Updated OnMessageReceived event handler in Program.cs
- Modified test case in MattermostClientTests.cs
- Changed post construction method in PostBuilder.cs
@bvdcode bvdcode self-assigned this Feb 21, 2025
@bvdcode bvdcode changed the base branch from main to develop February 21, 2025 00:33
@bvdcode bvdcode merged commit 2c536d3 into bvdcode:develop Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants