1
0
Fork 0
forked from mirrors/ntfy

Fixed PS examples

This commit is contained in:
binwiederhier 2023-04-06 09:57:45 -04:00
parent c63ca95867
commit b5b4997957
2 changed files with 11 additions and 5 deletions

View file

@ -134,8 +134,8 @@ a [title](#message-title), and [tag messages](#tags-emojis) 🥳 🎉. Here's an
URI = "https://ntfy.sh/phil_alerts"
Headers = @{
Title = "Unauthorized access detected"
Priority = "urgent"
Tags = "warning,skull"
Priority = "urgent"
Tags = "warning,skull"
}
Body = "Remote access to phils-laptop detected. Act right away."
}
@ -257,9 +257,9 @@ an [external image attachment](#attach-file-from-a-url) and [email publishing](#
URI = "https://ntfy.sh/mydoorbell"
Headers = @{
Click = "https://home.nest.com"
Attach = "https://nest.com/view/yAxksd.jpg"
Actions = "http, Open door, https://api.nest.com/open/yAxkasd, clear=true"
Email = "phil@example.com"
Attach = "https://nest.com/view/yAxksd.jpg"
Actions = "http, Open door, https://api.nest.com/open/yAxkasd, clear=true"
Email = "phil@example.com"
}
Body = "There's someone at the door. 🐶`n
`n
@ -2748,6 +2748,7 @@ Here's an example with a user `testuser` and password `fakepassword`:
``` powershell
# Get the credentials from the user
$Credential = Get-Credential testuser
# Alternatively, create a PSCredential object with the password from scratch
$Credential = [PSCredential]::new("testuser", (ConvertTo-SecureString "password" -AsPlainText -Force))
@ -2883,6 +2884,7 @@ with the token `tk_AgQdq7mVBoFD37zQVN29RhuMzNIz2`:
```
=== "PowerShell 5 and earlier"
``` powershell
# In PowerShell 5 and below, we can only send the Bearer token as a string in the Headers
$Request = @{
Method = "POST"

View file

@ -1169,3 +1169,7 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
**Bug fixes + maintenance:**
* Hide country flags on Windows ([#606](https://github.com/binwiederhier/ntfy/issues/606), thanks to [@cmeis](https://github.com/cmeis) for reporting, and to [@pokej6](https://github.com/pokej6) for fixing it)
**Documentation:**
* Updated PowerShell examples ([#697](https://github.com/binwiederhier/ntfy/pull/697), thanks to [@Natfan](https://github.com/Natfan))