From: Joe Rickerby
A Device Key is a secret URL for a device, containing both
@@ -207,7 +207,7 @@
You could do this from IFTTT, a Glitch app, your web app, or the command line. For example:
- Open
+ Open
| Download
curl '{{request.url}}?from=example' \
+
@@ -295,7 +295,7 @@
curl '{{print_key.url}}?from=example' \
-H 'content-type: text/plain' \
-d 'boop beep boop'Content-Type: text/html
Renders and prints HTML. Surprisingly powerful! Supports HTML elements, CSS styling, and embedded images.
-curl '{{request.url}}?from=htmlexample' \
+ curl '{{print_key.url}}?from=htmlexample' \
-H 'content-type: text/html' \
-d "<h1>Yep, you can do this</h1><small>or this</small>"
@@ -306,7 +306,7 @@
Content-Type: image/jpeg
Prints out the image data from the request body, in a lovely dithered style.
- cat mindblown.gif | curl '{{request.url}}?from=image-example' \
+ cat mindblown.gif | curl '{{print_key.url}}?from=image-example' \
-X POST \
-H 'content-type: image/gif' \
--data-binary @-
@@ -321,7 +321,7 @@
Send HTML using the html key or plain text using the text key.
- curl '{{request.url}}?from=jsonexample' \
+ curl '{{print_key.url}}?from=jsonexample' \
-H 'content-type: application/json' \
-d '{"html":"<h1>header!</h1>"}'
@@ -330,7 +330,7 @@
Content-Type: text/plain
Prints out plain text.
- curl '{{request.url}}?from=text-example' \
+ curl '{{print_key.url}}?from=text-example' \
-H 'content-type: text/plain' \
-d "I'm a little teapot"
@@ -340,7 +340,7 @@
This URL is also a status API e.g.
- curl '{{request.url}}'
+ curl '{{print_key.url}}'
This returns the status of the printer in JSON format.
diff --git a/sirius/web/templates/printer_overview.html b/sirius/web/templates/printer_overview.html
index 42fcbb8..34d2fbb 100644
--- a/sirius/web/templates/printer_overview.html
+++ b/sirius/web/templates/printer_overview.html
@@ -49,9 +49,8 @@
{% for print_key in printer.print_keys %}
-
- {{ print_key.secret }}
+
+ {{ print_key.url }}
{{ print_key.created.strftime('%H:%M %d/%m/%Y') }}