mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-14 11:47:33 +00:00
Fixed PS examples
This commit is contained in:
parent
c63ca95867
commit
b5b4997957
2 changed files with 11 additions and 5 deletions
|
@ -134,8 +134,8 @@ a [title](#message-title), and [tag messages](#tags-emojis) 🥳 🎉. Here's an
|
||||||
URI = "https://ntfy.sh/phil_alerts"
|
URI = "https://ntfy.sh/phil_alerts"
|
||||||
Headers = @{
|
Headers = @{
|
||||||
Title = "Unauthorized access detected"
|
Title = "Unauthorized access detected"
|
||||||
Priority = "urgent"
|
Priority = "urgent"
|
||||||
Tags = "warning,skull"
|
Tags = "warning,skull"
|
||||||
}
|
}
|
||||||
Body = "Remote access to phils-laptop detected. Act right away."
|
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"
|
URI = "https://ntfy.sh/mydoorbell"
|
||||||
Headers = @{
|
Headers = @{
|
||||||
Click = "https://home.nest.com"
|
Click = "https://home.nest.com"
|
||||||
Attach = "https://nest.com/view/yAxksd.jpg"
|
Attach = "https://nest.com/view/yAxksd.jpg"
|
||||||
Actions = "http, Open door, https://api.nest.com/open/yAxkasd, clear=true"
|
Actions = "http, Open door, https://api.nest.com/open/yAxkasd, clear=true"
|
||||||
Email = "phil@example.com"
|
Email = "phil@example.com"
|
||||||
}
|
}
|
||||||
Body = "There's someone at the door. 🐶`n
|
Body = "There's someone at the door. 🐶`n
|
||||||
`n
|
`n
|
||||||
|
@ -2748,6 +2748,7 @@ Here's an example with a user `testuser` and password `fakepassword`:
|
||||||
``` powershell
|
``` powershell
|
||||||
# Get the credentials from the user
|
# Get the credentials from the user
|
||||||
$Credential = Get-Credential testuser
|
$Credential = Get-Credential testuser
|
||||||
|
|
||||||
# Alternatively, create a PSCredential object with the password from scratch
|
# Alternatively, create a PSCredential object with the password from scratch
|
||||||
$Credential = [PSCredential]::new("testuser", (ConvertTo-SecureString "password" -AsPlainText -Force))
|
$Credential = [PSCredential]::new("testuser", (ConvertTo-SecureString "password" -AsPlainText -Force))
|
||||||
|
|
||||||
|
@ -2883,6 +2884,7 @@ with the token `tk_AgQdq7mVBoFD37zQVN29RhuMzNIz2`:
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "PowerShell 5 and earlier"
|
=== "PowerShell 5 and earlier"
|
||||||
|
``` powershell
|
||||||
# In PowerShell 5 and below, we can only send the Bearer token as a string in the Headers
|
# In PowerShell 5 and below, we can only send the Bearer token as a string in the Headers
|
||||||
$Request = @{
|
$Request = @{
|
||||||
Method = "POST"
|
Method = "POST"
|
||||||
|
|
|
@ -1169,3 +1169,7 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
|
||||||
**Bug fixes + maintenance:**
|
**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)
|
* 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))
|
||||||
|
|
Loading…
Reference in a new issue