From 08403b616f9dad83cb1204eec83ba1252e3eb129 Mon Sep 17 00:00:00 2001
From: justanothercatgirl The API follows this convention: everything is done through GET requests, client supplies all necessary parameters in URLencoded format.
Whatever server returns depends on parameters; it may be application/json (for programmable API) OR text/html (to render in HTML) Example request: http://ln.twistea.su/api/linkadd?url=https%3A%2F%2Fexample.com&format=html. Example request: http://ln.twistea.su/api/linkadd?url=https%3A%2F%2Fexample.com&format=html. Note: server may return json string like null or true: according to
rfc-8259, this is valid json and clients have to handle this accordingly.API reference
+
This request may return something like: <a href="http://server.com/DEADF00D">your link: DEADF00D</a>
try? | -string: PATH to try to put link under + | string: PATH to try to put link under + shoud match regex [a-zA-Z0-9]+, length ≤ 10 + may work with length = 11, but not always + (if not occupied, WITHOUT https://server.com/) |
||
/api/linkget | path | string: PATH to get link info from | -{"url": "original url", created: int unix_timestamp} + | {"url": "original url", created: int unix_timestamp} OR null |