Compare commits
10 Commits
user-heade
...
scalar-api
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3619c80544 | ||
|
|
27bce6f4d1 | ||
|
|
eb3549eedc | ||
|
|
cea5fececb | ||
|
|
f686b8c548 | ||
|
|
b26546b709 | ||
|
|
a06550a90f | ||
|
|
d2e0588037 | ||
|
|
854aa1f783 | ||
|
|
0ae2ca43bd |
192
docs/api/index.html
Normal file
192
docs/api/index.html
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>ntfy API Reference</title>
|
||||||
|
<link rel="icon" type="image/png" href="/static/img/favicon.png">
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header matching docs.ntfy.sh */
|
||||||
|
.header {
|
||||||
|
background: linear-gradient(to right, #317f6f, #14b8a6);
|
||||||
|
padding: 16px 20px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-content {
|
||||||
|
max-width: 1400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
|
color: white;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text p {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 2px 0 0 0;
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-links {
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-links a {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
opacity: 0.9;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-links a:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scalar container */
|
||||||
|
#scalar-api-reference {
|
||||||
|
width: 100%;
|
||||||
|
min-height: calc(100vh - 100px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide Share and Generate SDKs menu items */
|
||||||
|
[data-scalar-menu-item="share"],
|
||||||
|
[data-scalar-menu-item="sdk"],
|
||||||
|
.scalar-card-header-actions button[title="Share"],
|
||||||
|
.scalar-card-header-actions button[title="Generate SDK"],
|
||||||
|
button:has(> span:contains("Share")),
|
||||||
|
button:has(> span:contains("SDK")) {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.header-content {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.header-links {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Header -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="header-content">
|
||||||
|
<a href="/" style="display: flex; align-items: center; text-decoration: none;">
|
||||||
|
<img src="/static/img/ntfy.png" width="35" height="35" alt="ntfy logo" style="margin-right: 10px;">
|
||||||
|
</a>
|
||||||
|
<div class="header-text">
|
||||||
|
<h1>ntfy</h1>
|
||||||
|
<p>API Reference</p>
|
||||||
|
</div>
|
||||||
|
<div class="header-links">
|
||||||
|
<a href="/">Documentation Home</a>
|
||||||
|
<a href="https://ntfy.sh">ntfy.sh</a>
|
||||||
|
<a href="https://github.com/binwiederhier/ntfy">GitHub</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Scalar API Reference -->
|
||||||
|
<div id="scalar-api-reference"></div>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="./scalar-style.css" />
|
||||||
|
<script src="./scalar-standalone.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function initScalar() {
|
||||||
|
const targetElement = document.getElementById('scalar-api-reference');
|
||||||
|
|
||||||
|
if (!targetElement) {
|
||||||
|
setTimeout(initScalar, 50);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof Scalar === 'undefined' || typeof Scalar.createApiReference !== 'function') {
|
||||||
|
setTimeout(initScalar, 50);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
url: './openapi.yaml',
|
||||||
|
layout: 'modern',
|
||||||
|
theme: 'default',
|
||||||
|
customCss: `
|
||||||
|
/* Hide Share and Generate SDKs menu items in dropdowns */
|
||||||
|
[data-testid="share-button"],
|
||||||
|
[data-testid="sdk-button"],
|
||||||
|
.context-menu-item:has(svg[data-icon="share"]),
|
||||||
|
.context-menu-item:has(svg[data-icon="sdk"]),
|
||||||
|
.dropdown-item:has(span:contains("Share")),
|
||||||
|
.dropdown-item:has(span:contains("SDK")),
|
||||||
|
.scalar-dropdown-item[data-action="share"],
|
||||||
|
.scalar-dropdown-item[data-action="generate-sdk"],
|
||||||
|
button[aria-label="Share"],
|
||||||
|
button[aria-label="Generate SDK"] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
configuration: {
|
||||||
|
hideSidebar: false,
|
||||||
|
hideSearch: false,
|
||||||
|
hideModels: false,
|
||||||
|
hideDownloadButton: false,
|
||||||
|
hideTabs: false,
|
||||||
|
hideServerUrl: false,
|
||||||
|
hideInfo: false,
|
||||||
|
darkMode: false,
|
||||||
|
withDefaultFonts: false,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
Scalar.createApiReference('#scalar-api-reference', config);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error initializing Scalar:', error);
|
||||||
|
targetElement.innerHTML = '<div style="padding: 20px; color: red;">Error loading API reference: ' + error.message + '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', initScalar);
|
||||||
|
} else {
|
||||||
|
setTimeout(initScalar, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('load', function() {
|
||||||
|
setTimeout(initScalar, 200);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2370
docs/api/openapi.yaml
Normal file
2370
docs/api/openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
35987
docs/api/scalar-standalone.js
Normal file
35987
docs/api/scalar-standalone.js
Normal file
File diff suppressed because one or more lines are too long
11911
docs/api/scalar-style.css
Normal file
11911
docs/api/scalar-style.css
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1619,7 +1619,7 @@ And the same example using [JSON publishing](#publish-as-json):
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
topic: "myhome",
|
topic: "myhome",
|
||||||
message": "Somebody retweeted your tweet.",
|
message: "Somebody retweeted your tweet.",
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
action: "view",
|
action: "view",
|
||||||
@@ -1879,7 +1879,7 @@ And the same example using [JSON publishing](#publish-as-json):
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
topic: "wifey",
|
topic: "wifey",
|
||||||
message": "Your wife requested you send a picture of yourself.",
|
message: "Your wife requested you send a picture of yourself.",
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
"action": "broadcast",
|
"action": "broadcast",
|
||||||
@@ -2154,7 +2154,7 @@ And the same example using [JSON publishing](#publish-as-json):
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
topic: "myhome",
|
topic: "myhome",
|
||||||
"message": "Garage door has been open for 15 minutes. Close it?",
|
message: "Garage door has been open for 15 minutes. Close it?",
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
"action": "http",
|
"action": "http",
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ nav:
|
|||||||
- "Other things":
|
- "Other things":
|
||||||
- "FAQs": faq.md
|
- "FAQs": faq.md
|
||||||
- "Examples": examples.md
|
- "Examples": examples.md
|
||||||
|
- "API Reference": /api/
|
||||||
- "Integrations + projects": integrations.md
|
- "Integrations + projects": integrations.md
|
||||||
- "Release notes": releases.md
|
- "Release notes": releases.md
|
||||||
- "Emojis 🥳 🎉": emojis.md
|
- "Emojis 🥳 🎉": emojis.md
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
# If enabled, allow outgoing e-mail notifications via the 'X-Email' header. If this header is set,
|
# If enabled, allow outgoing e-mail notifications via the 'X-Email' header. If this header is set,
|
||||||
# messages will additionally be sent out as e-mail using an external SMTP server.
|
# messages will additionally be sent out as e-mail using an external SMTP server.
|
||||||
#
|
#
|
||||||
# As of today, only SMTP servers with plain text auth (or no auth at all), and STARTLS are supported.
|
# As of today, only SMTP servers with plain text auth (or no auth at all), and STARTTLS are supported.
|
||||||
# Please also refer to the rate limiting settings below (visitor-email-limit-burst & visitor-email-limit-burst).
|
# Please also refer to the rate limiting settings below (visitor-email-limit-burst & visitor-email-limit-burst).
|
||||||
#
|
#
|
||||||
# - smtp-sender-addr is the hostname:port of the SMTP server
|
# - smtp-sender-addr is the hostname:port of the SMTP server
|
||||||
@@ -198,8 +198,8 @@
|
|||||||
# - web-push-private-key is the generated VAPID private key, e.g. AA2BB1234567890abcdefzxcvbnm1234567890
|
# - web-push-private-key is the generated VAPID private key, e.g. AA2BB1234567890abcdefzxcvbnm1234567890
|
||||||
# - web-push-file is a database file to keep track of browser subscription endpoints, e.g. /var/cache/ntfy/webpush.db
|
# - web-push-file is a database file to keep track of browser subscription endpoints, e.g. /var/cache/ntfy/webpush.db
|
||||||
# - web-push-email-address is the admin email address send to the push provider, e.g. sysadmin@example.com
|
# - web-push-email-address is the admin email address send to the push provider, e.g. sysadmin@example.com
|
||||||
# - web-push-startup-queries is an optional list of queries to run on startup`
|
# - web-push-startup-queries is an optional list of queries to run on startup
|
||||||
# - web-push-expiry-warning-duration defines the duration after which unused subscriptions are sent a warning (default is 55d`)
|
# - web-push-expiry-warning-duration defines the duration after which unused subscriptions are sent a warning (default is 55d)
|
||||||
# - web-push-expiry-duration defines the duration after which unused subscriptions will expire (default is 60d)
|
# - web-push-expiry-duration defines the duration after which unused subscriptions will expire (default is 60d)
|
||||||
#
|
#
|
||||||
# web-push-public-key:
|
# web-push-public-key:
|
||||||
@@ -280,7 +280,7 @@
|
|||||||
#
|
#
|
||||||
# - upstream-base-url is the base URL of the upstream server. Should be "https://ntfy.sh".
|
# - upstream-base-url is the base URL of the upstream server. Should be "https://ntfy.sh".
|
||||||
# - upstream-access-token is the token used to authenticate with the upstream server. This is only required
|
# - upstream-access-token is the token used to authenticate with the upstream server. This is only required
|
||||||
# if you exceed the upstream rate limits, or the uptream server requires authentication.
|
# if you exceed the upstream rate limits, or the upstream server requires authentication.
|
||||||
#
|
#
|
||||||
# upstream-base-url:
|
# upstream-base-url:
|
||||||
# upstream-access-token:
|
# upstream-access-token:
|
||||||
|
|||||||
Reference in New Issue
Block a user