From d684709eae01e2d197780d8f6e0f5a888ff1c2c8 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Fri, 13 Jan 2023 12:07:04 +0100 Subject: Add a(nother) real-world API usage example --- htdocs/themes/bootstrap/views/api_help.php | 4 ++++ htdocs/themes/cleanwhite/views/api_help.php | 4 ++++ htdocs/themes/default/views/api_help.php | 4 ++++ htdocs/themes/geocities/views/api_help.php | 4 ++++ htdocs/themes/i386/views/api_help.php | 4 ++++ htdocs/themes/stikkedizr/views/api_help.php | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/htdocs/themes/bootstrap/views/api_help.php b/htdocs/themes/bootstrap/views/api_help.php index 2109feb..25e6160 100644 --- a/htdocs/themes/bootstrap/views/api_help.php +++ b/htdocs/themes/bootstrap/views/api_help.php @@ -78,6 +78,10 @@ echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

+

Create paste via a pipe with sudo, text format, setting the author and a 30 minute expiry

+ sudo dmesg | curl -d private=1 -d lang=text -d name=`whoami` -d expire=30 --data-urlencode text@- +

Create a paste based capturing sudo dmesg and showing how to employ optional parameters to the paste creation.

+

Get paste ;-)

curl

Display paste.

diff --git a/htdocs/themes/cleanwhite/views/api_help.php b/htdocs/themes/cleanwhite/views/api_help.php index 4806733..a36887b 100644 --- a/htdocs/themes/cleanwhite/views/api_help.php +++ b/htdocs/themes/cleanwhite/views/api_help.php @@ -73,6 +73,10 @@ echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

+

Create paste via a pipe with sudo, text format, setting the author and a 30 minute expiry

+ sudo dmesg | curl -d private=1 -d lang=text -d name=`whoami` -d expire=30 --data-urlencode text@- +

Create a paste based capturing sudo dmesg and showing how to employ optional parameters to the paste creation.

+

Get paste ;-)

curl

Display paste.

diff --git a/htdocs/themes/default/views/api_help.php b/htdocs/themes/default/views/api_help.php index 4806733..a36887b 100644 --- a/htdocs/themes/default/views/api_help.php +++ b/htdocs/themes/default/views/api_help.php @@ -73,6 +73,10 @@ echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

+

Create paste via a pipe with sudo, text format, setting the author and a 30 minute expiry

+ sudo dmesg | curl -d private=1 -d lang=text -d name=`whoami` -d expire=30 --data-urlencode text@- +

Create a paste based capturing sudo dmesg and showing how to employ optional parameters to the paste creation.

+

Get paste ;-)

curl

Display paste.

diff --git a/htdocs/themes/geocities/views/api_help.php b/htdocs/themes/geocities/views/api_help.php index 2109feb..25e6160 100644 --- a/htdocs/themes/geocities/views/api_help.php +++ b/htdocs/themes/geocities/views/api_help.php @@ -78,6 +78,10 @@ echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

+

Create paste via a pipe with sudo, text format, setting the author and a 30 minute expiry

+ sudo dmesg | curl -d private=1 -d lang=text -d name=`whoami` -d expire=30 --data-urlencode text@- +

Create a paste based capturing sudo dmesg and showing how to employ optional parameters to the paste creation.

+

Get paste ;-)

curl

Display paste.

diff --git a/htdocs/themes/i386/views/api_help.php b/htdocs/themes/i386/views/api_help.php index 2109feb..25e6160 100644 --- a/htdocs/themes/i386/views/api_help.php +++ b/htdocs/themes/i386/views/api_help.php @@ -78,6 +78,10 @@ echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

+

Create paste via a pipe with sudo, text format, setting the author and a 30 minute expiry

+ sudo dmesg | curl -d private=1 -d lang=text -d name=`whoami` -d expire=30 --data-urlencode text@- +

Create a paste based capturing sudo dmesg and showing how to employ optional parameters to the paste creation.

+

Get paste ;-)

curl

Display paste.

diff --git a/htdocs/themes/stikkedizr/views/api_help.php b/htdocs/themes/stikkedizr/views/api_help.php index 992c985..be94a02 100644 --- a/htdocs/themes/stikkedizr/views/api_help.php +++ b/htdocs/themes/stikkedizr/views/api_help.php @@ -78,6 +78,10 @@ echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

+

Create paste via a pipe with sudo, text format, setting the author and a 30 minute expiry

+ sudo dmesg | curl -d private=1 -d lang=text -d name=`whoami` -d expire=30 --data-urlencode text@- +

Create a paste based capturing sudo dmesg and showing how to employ optional parameters to the paste creation.

+

Get paste ;-)

curl

Display paste.

-- cgit v1.2.3