{"id":8,"date":"2023-09-24T07:51:44","date_gmt":"2023-09-24T07:51:44","guid":{"rendered":"https:\/\/play.triaromhosting.uk\/?page_id=8"},"modified":"2023-09-24T08:00:31","modified_gmt":"2023-09-24T08:00:31","slug":"test","status":"publish","type":"page","link":"https:\/\/play.triaromhosting.uk\/?page_id=8","title":{"rendered":"test"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"en\"><br \/>\n<head><br \/>\n    <meta charset=\"UTF-8\"><br \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n    <title>Send Message to ntfy.sh<\/title><br \/>\n<\/head><br \/>\n<body><\/p>\n<h1>Send Message to ntfy.sh<\/h1>\n<p>    <label for=\"message\">Message:<\/label><br \/>\n    <input type=\"text\" id=\"message\" placeholder=\"Type your message...\"><br \/>\n    <button id=\"sendMessage\">Send Message<\/button><\/p>\n<p>    <script>\n        document.getElementById(\"sendMessage\").addEventListener(\"click\", function () {\n            const message = document.getElementById(\"message\").value;<\/p>\n<p>            \/\/ Replace 'YOUR_API_KEY' with your ntfy.sh API key\n            const apiKey = 'tk_tqxv0btuxp8r4uctmbtwxcwez0q34';<\/p>\n<p>            \/\/ Replace 'lindeth-howe' with your desired topic\n            const topic = 'lindeth-howe';<\/p>\n<p>            const apiUrl = `https:\/\/ntfy.sh\/api\/topic\/${topic}`;<\/p>\n<p>            const data = {\n                message: message\n            };<\/p>\n<p>            fetch(apiUrl, {\n                method: 'POST',\n                headers: {\n                    'Content-Type': 'application\/json',\n                    'Authorization': `Bearer ${apiKey}`\n                },\n                body: JSON.stringify(data)\n            })\n            .then(response => response.json())\n            .then(data => {\n                console.log(data);\n                alert(\"Message sent successfully!\");\n            })\n            .catch(error => {\n                console.error(\"Error sending message:\", error);\n                alert(\"Error sending message. Please try again later.\");\n            });\n        });\n    <\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Send Message to ntfy.sh Send Message to ntfy.sh Message: Send Message<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=\/wp\/v2\/pages\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":3,"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=\/wp\/v2\/pages\/8\/revisions"}],"predecessor-version":[{"id":11,"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=\/wp\/v2\/pages\/8\/revisions\/11"}],"wp:attachment":[{"href":"https:\/\/play.triaromhosting.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}