QRLifetime

v1.0.1
io.github.mac-from-mcs/qrlifetime Checked 2 days ago Published 11 days ago

Static QR codes as SVG, offline, plus dynamic QR codes you can edit and track with QRLifetime.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_qr_code Generate a static QR code

Generate a static QR code as SVG, offline, with no account. The link or text is stored inside the code itself, so it keeps working for as long as the link does, but it cannot be changed after printing. Use create_dynamic_qr_code instead when the destination may change or scans must be counted.

ParameterTypeDescription
text *stringURL or text to encode.
backgroundstringHex background colour, e.g. #ffffff.
error_correctionstringL 7%, M 15% (default), Q 25%, H 30% of the code can be damaged.
foregroundstringHex colour of the modules, e.g. #000000. Keep it dark on a light background.
output_pathstringAbsolute path of a new .svg file to write (an existing file is never overwritten). When omitted, the SVG is returned as text.
sizeintegerWidth and height of the SVG in pixels (default 512).

list_dynamic_qr_codes List dynamic QR codes

List the dynamic (editable) QR codes of your QRLifetime account, newest first, 50 per page. Needs QRLIFETIME_API_KEY (Business plan).

ParameterTypeDescription
pageintegerPage number, starting at 1.

create_dynamic_qr_code Create a dynamic QR code

Create an editable QR code that redirects to `destination`. The response gives `shortUrl` (the URL to encode in the QR code; pass it to generate_qr_code to get the image) and `link` (the same code as a short link on qrkeep.me). The destination can be changed later, scans are counted, and the code keeps redirecting even if the plan ends. Needs QRLIFETIME_API_KEY.

ParameterTypeDescription
destination *stringhttp or https URL the code redirects to.
designobjectStyle object from the QRLifetime editor (colours, logo, frame). Omit to use your brand kit.
namestringYour label for the code.

get_dynamic_qr_code Read a dynamic QR code

Read one dynamic QR code by its slug, with its destination and total number of scans. Needs QRLIFETIME_API_KEY.

ParameterTypeDescription
slug *stringSlug of the code, e.g. ab3k7mx (the end of its short URL).

update_dynamic_qr_code Change a dynamic QR code

Change the destination, name or style of a dynamic QR code. Printed codes follow the new destination on the next scan. Needs QRLIFETIME_API_KEY.

ParameterTypeDescription
slug *stringSlug of the code.
designobjectStyle object from the QRLifetime editor (colours, logo, frame). Omit to use your brand kit.
destinationstringNew http or https destination.
namestringYour label for the code.

delete_dynamic_qr_code Delete a dynamic QR code

Delete a dynamic QR code. Its redirect stops immediately, so any printed copy stops working. Only use it for codes that are not printed anywhere. Needs QRLIFETIME_API_KEY.

ParameterTypeDescription
slug *stringSlug of the code.