NN.Notifications.psm1
#Region '.\Public\Send-DiscordMessage.ps1' 0 function Send-DiscordMessage { param ( [Parameter(Mandatory)][string]$message, [Parameter(Mandatory)][string]$uri ) $InvokeRestMethodSplat = @{ Body = [PSCustomObject]@{ content = $message } | ConvertTo-Json ContentType = 'Application/Json' Method = 'POST' Uri = $uri } Invoke-RestMethod @InvokeRestMethodSplat } #EndRegion '.\Public\Send-DiscordMessage.ps1' 17 #Region '.\Public\Send-TeamsMessage.ps1' 0 function Send-TeamsMessage { param ( [Parameter(Mandatory)]$message, [Parameter(Mandatory)]$hookUri ) $InvokeRestMethodSplat = @{ Body = [PSCustomObject]@{ text = $message } | ConvertTo-Json ContentType = 'Application/Json' Method = 'POST' Uri = $hookUri } Invoke-RestMethod @InvokeRestMethodSplat } #EndRegion '.\Public\Send-TeamsMessage.ps1' 17 |