35 lines
824 B
PowerShell
35 lines
824 B
PowerShell
|
function Get-SlackAttachmentFields {
|
||
|
<#
|
||
|
.SYNOPSIS
|
||
|
Used to create a Field object for the Slack Attachment that attaches to the Slack Message.
|
||
|
|
||
|
.PARAMETER Title
|
||
|
Shown as a bold heading displayed in the field object.
|
||
|
|
||
|
.PARAMETER Value
|
||
|
The text value displayed in the field object.
|
||
|
|
||
|
.PARAMETER Short
|
||
|
Indicates whether the field object is short enough to be displayed side-by-side with other field objects. Defaults to false.
|
||
|
#>
|
||
|
[CmdletBinding()]
|
||
|
[OutputType([object])]
|
||
|
param (
|
||
|
[Parameter(Mandatory = $false)]
|
||
|
[string]$Title = "",
|
||
|
|
||
|
[Parameter(Mandatory = $false)]
|
||
|
[string]$Value = "",
|
||
|
|
||
|
[Parameter(Mandatory = $false)]
|
||
|
[switch]$Short
|
||
|
)
|
||
|
|
||
|
$result = @{
|
||
|
title = $Title
|
||
|
value = $Value
|
||
|
short = $Short
|
||
|
}
|
||
|
|
||
|
return $result
|
||
|
}
|