-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe1ea0a
commit 6f46546
Showing
11 changed files
with
124 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Send-TeamsMessage -Verbose -Color DimGray { | ||
New-TeamsSection -Title 'This is 2nd section within 1 message' { | ||
New-TeamsList -Name 'Testing List' { | ||
New-TeamsListItem -Text 'First ordered list item' -Level 0 | ||
New-TeamsListItem -Text 'Another item' -Level 0 -Numbered | ||
} | ||
} | ||
} -Uri $TeamsID -MessageSummary 'Test1' #-MessageText 'Test2' -MessageTitle 'Test1' # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Send-TeamsMessage -URI $TeamsID -MessageText "This text will show up" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Send-TeamsMessage -Verbose { | ||
New-TeamsSection { | ||
ActivityTitle -Title "**Elon Musk**" | ||
ActivitySubtitle -Subtitle "@elonmusk - 9/12/2016 at 5:33pm" | ||
ActivityImageLink -Link "https://pbs.twimg.com/profile_images/782474226020200448/zDo-gAo0.jpg" | ||
ActivityText -Text "Climate change explained in comic book form by xkcd xkcd.com/1732" | ||
} | ||
New-TeamsSection { | ||
ActivityTitle -Title "**Mark Knopfler**" | ||
ActivitySubtitle -Subtitle "@MarkKnopfler - 9/12/2016 at 1:12pm" | ||
ActivityImageLink -Link "https://pbs.twimg.com/profile_images/1042367841117384704/YvrqQiBK_400x400.jpg" | ||
ActivityText -Text "Mark Knopfler features on B.B King's all-star album of Blues greats, released on this day in 2005..." | ||
} | ||
New-TeamsSection { | ||
ActivityTitle -Title "**Elon Musk**" | ||
ActivitySubtitle -Subtitle "@elonmusk - 9/12/2016 at 5:33pm" | ||
ActivityImageLink -Link "https://pbs.twimg.com/profile_images/782474226020200448/zDo-gAo0.jpg" | ||
ActivityText -Text "Climate change explained in comic book form by xkcd xkcd.com/1732" | ||
} | ||
} -Uri $TeamsID -Color DarkSeaGreen -MessageSummary 'Tweet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function New-TeamsActivityImage { | ||
[CmdletBinding()] | ||
[alias('ActivityImageLink', 'TeamsActivityImageLink', 'New-TeamsActivityImageLink', 'ActivityImage', 'TeamsActivityImage')] | ||
param( | ||
[string][ValidateSet('Alert', 'Cancel', 'Disable', 'Download', 'Minus', 'Check', 'Add', 'None')] $Image, | ||
[string] $Link | ||
) | ||
if ($Image) { | ||
if ($Image -ne 'None') { | ||
$StoredImages = [IO.Path]::Combine("$(Split-Path -Path $PSScriptRoot -Parent)", "Images") | ||
@{ | ||
ActivityImageLink = Get-Image -PathToImages $StoredImages -FileName $Image -FileExtension '.jpg' # -Verbose | ||
type = 'ActivityImage' | ||
} | ||
} | ||
} else { | ||
@{ | ||
ActivityImageLink = $Link | ||
Type = 'ActivityImageLink' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function New-TeamsActivitySubtitle { | ||
[CmdletBinding()] | ||
[alias('ActivitySubtitle', 'TeamsActivitySubtitle')] | ||
param( | ||
[string] $Subtitle | ||
) | ||
@{ | ||
ActivitySubtitle = $Subtitle | ||
Type = 'ActivitySubtitle' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function New-TeamsActivityTitle { | ||
[CmdletBinding()] | ||
[alias('ActivityTitle', 'TeamsActivityTitle')] | ||
param( | ||
[string] $Title | ||
) | ||
@{ | ||
ActivityTitle = $Title | ||
Type = 'ActivityTitle' | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function New-TeamsActivityText { | ||
[CmdletBinding()] | ||
[alias('ActivityText','TeamsActivityText')] | ||
param( | ||
[string] $Text | ||
) | ||
@{ | ||
ActivityText = $Text | ||
Type = 'ActivityText' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters