From fc1226c0dcfd904448004772f7748721c9e8c1b3 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Tue, 30 Jul 2024 17:11:37 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20gotify/w?= =?UTF-8?q?ebsite@50753f64ad6ac52e587db4c6aa82bc8ba8c82424=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pushmsg.html | 6 +++++- docs/pushmsg/index.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/pushmsg.html b/docs/pushmsg.html index d1fd6c9..e1ccafc 100644 --- a/docs/pushmsg.html +++ b/docs/pushmsg.html @@ -63,10 +63,14 @@

To authenticate as an application you need the application token. The token is returned in the REST request and is viewable in the WebUI.

-

Now you can simply use curl, HTTPie or any other http-client to push messages.

+

Now you can simply use curl, HTTPie or any other installed http-client to push messages.

$ curl "https://push.example.de/message?token=<apptoken>" -F "title=my title" -F "message=my message" -F "priority=5"
 $ http -f POST "https://push.example.de/message?token=<apptoken>" title="my title" message="my message" priority="5"
 
+

On Microsoft PowerShell, you could alternatively use the built-in Invoke-RestMethod or Invoke-WebRequest cmdlets.

+
PS> Invoke-RestMethod -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is automatically parsed into a PowerShell object
+PS> Invoke-WebRequest -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is as raw response
+

The message API takes an extras property that carries extra information with the message and describes how clients behave to this message. See message extras for more information.

diff --git a/docs/pushmsg/index.html b/docs/pushmsg/index.html index d1fd6c9..e1ccafc 100644 --- a/docs/pushmsg/index.html +++ b/docs/pushmsg/index.html @@ -63,10 +63,14 @@

To authenticate as an application you need the application token. The token is returned in the REST request and is viewable in the WebUI.

-

Now you can simply use curl, HTTPie or any other http-client to push messages.

+

Now you can simply use curl, HTTPie or any other installed http-client to push messages.

$ curl "https://push.example.de/message?token=<apptoken>" -F "title=my title" -F "message=my message" -F "priority=5"
 $ http -f POST "https://push.example.de/message?token=<apptoken>" title="my title" message="my message" priority="5"
 
+

On Microsoft PowerShell, you could alternatively use the built-in Invoke-RestMethod or Invoke-WebRequest cmdlets.

+
PS> Invoke-RestMethod -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is automatically parsed into a PowerShell object
+PS> Invoke-WebRequest -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is as raw response
+

The message API takes an extras property that carries extra information with the message and describes how clients behave to this message. See message extras for more information.