Slack Event Payload (MessageX.Slack/SlackEventPayload.cs)

PSTeams · Sources/MessageX.Slack/SlackEventPayload.cs · csharp · MIT
integration, chat, tag:json

Typed data projection for verified Slack Events API payloads. Use when handling incoming webhook events from Slack.

// Source: https://github.com/EvotecIT/PSTeams | License: MIT | Copyright 2011-2020 Evotec
// Provided via justclaw.it.com; keep this notice with the code.
using System.Text.Json.Serialization;

namespace MessageX.Slack;

/// <summary>Safe typed projection of the supported fields in a verified Slack Events API event.</summary>
public sealed class SlackEventPayload {
    /// <summary>Creates a safe Slack event projection.</summary>
    [JsonConstructor]
    public SlackEventPayload(
        string type,
        string? subtype,
        string? userId,
        string? channelId,
        string? channelType,
        string? messageTimestamp,
        string? eventTimestamp,
        string? threadTimestamp,
        string? text,
        string? reaction,
        string? itemType) {
        Type

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key