Add option for GET request for simple barcodes

This commit is contained in:
Fred Boniface
2023-09-08 10:41:51 +01:00
parent 7171bffc5e
commit 99a1a25254
2 changed files with 62 additions and 9 deletions

View File

@@ -4,7 +4,12 @@
{{ end }}
{{ define "body" }}
<p>API Requests can be made by making a POST request to /generate</p>
<p>For simple textual QR, Aztec or DataMatrix codes, a GET request can be made as follows:</p>
<code>/generate?type=[qr|aztec|datamatrix]&text=[YOUR_TEXT]</code>
<p>Dimensions will default to 300x300, and ECC level to 2.</p>
<p>This is also the format for URL barcodes</p>
<p>For other barcode types and custom options, API Requests can be made by making a POST request to /generate</p>
<p>The request body should be JSON similar to the below</p>
@@ -35,6 +40,7 @@
<p>The response will be a PNG image</p>
<h2>Formatted Barcodes</h2>
<p>Formatted barcodes are under development, this API endpoint <code>/generate/format</code> will produce a QR, Aztec or Datamatrix barcode with one of the following formats:</p>
@@ -47,4 +53,5 @@
<li>Phone Number</li>
</ul>
<p>Note that URLs have no special formatting and can be produced as plain text barcodes using the <code>/generate</code> endpoint</p>
<p>This endpoint is not yet available</p>
{{ end }}