Update publish.md

pull/234/head
aTable 2022-05-05 20:14:01 +10:00 committed by GitHub
parent 1af9a85847
commit c3c4c9e9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 16 deletions

View File

@ -163,25 +163,21 @@ a [title](#message-title), and [tag messages](#tags-emojis) 🥳 🎉. Here's an
<figcaption>Urgent notification with tags and title</figcaption> <figcaption>Urgent notification with tags and title</figcaption>
</figure> </figure>
A detailed example: You can also do multi-line messages. Here's an example using a click action, a user action, with an external image attachment and forwarded via email:
=== "Bash" === "Bash"
``` ```
#!/bin/bash #!/bin/bash
curl \ curl \
-X PUT \ -H "Click: https://home.nest.com/" \
-H "X-Title: Nearby roadworks" \ -H "Attach: https://nest.com/view/yAxkasd.jpg" \
-H "X-Priority: low" \ -H "Actions: http, Open door, https://api.nest.com/open/yAxkasd, clear=true" \
-H "X-Tags: loudspeaker" \ -H "Email: phil@example.com" \
-H "X-Click: https://dictionary.cambridge.org/dictionary/english/roadworks" \ -d "There's someone at the door. 🐶
-H "X-Attach: https://ntfy.sh/docs/static/img/ntfy.png" \
-H "X-Filename: logo" \ Please check if it's a good boy or a hooman.
-H "X-Delay: 15s" \ Doggies have been known to ring the doorbell." \
-H "Actions: view, View Map, https://www.google.com/maps/place/48%C2%B051'33.2%22N+2%C2%B017'41.0%22E/@48.8592175%2C2.2925253%2C17z, clear=true;" \ ntfy.sh/mydoorbell
-d "Planned closures with high impact to commuters.
6am - 9:30am.
Until further notice." \
ntfy.sh/commuter_alerts
``` ```
=== "ntfy CLI" === "ntfy CLI"
@ -220,7 +216,7 @@ Until further notice." \
``` ```
<figure markdown> <figure markdown>
![priority notification](static/img/complete-notification.png){ width=500 } ![priority notification](static/img/complete-notification.jpg){ width=500 }
<figcaption>Detailed notification with title, priority, tags, on click, attachment link with custom file name, delayed delivery, multiline message and an action button</figcaption> <figcaption>Detailed notification with title, priority, tags, on click, attachment link with custom file name, delayed delivery, multiline message and an action button</figcaption>
</figure> </figure>