fix: update docs to reflect code

This commit is contained in:
nate 2026-03-22 05:01:14 +04:00
parent 859a55d66b
commit 42b6aae54e
2 changed files with 21 additions and 13 deletions

View File

@ -130,9 +130,28 @@
<span class="k">"name"</span>: <span class="s">"My API"</span>,
<span class="k">"url"</span>: <span class="s">"https://api.example.com/health"</span>,
<span class="k">"interval_s"</span>: <span class="n">60</span>, <span class="c">// check every 60 seconds (min: 2)</span>
<span class="k">"method"</span>: <span class="s">"POST"</span>, <span class="c">// optional — default: GET</span>
<span class="k">"request_headers"</span>: { <span class="s">"X-Api-Key"</span>: <span class="s">"secret"</span> }, <span class="c">// optional</span>
<span class="k">"request_body"</span>: <span class="s">"{\"ping\": true}"</span>, <span class="c">// optional — Content-Type defaults to application/json</span>
<span class="k">"regions"</span>: [<span class="s">"eu-central"</span>, <span class="s">"us-west"</span>], <span class="c">// optional — default: all regions</span>
<span class="k">"timeout_ms"</span>: <span class="n">10000</span>, <span class="c">// optional — default: 10000</span>
<span class="k">"query"</span>: { ... } <span class="c">// optional — see Query Language below</span>
}</pre>
</div>
<table>
<thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td>name</td><td>string</td><td>Display name for the monitor</td></tr>
<tr><td>url</td><td>string</td><td>URL to monitor</td></tr>
<tr><td>interval_s</td><td>number</td><td>Check interval in seconds (min: 30 free, 2 pro)</td></tr>
<tr><td>method</td><td>string</td><td>HTTP method — GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS</td></tr>
<tr><td>request_headers</td><td>object</td><td>Custom headers as key-value pairs</td></tr>
<tr><td>request_body</td><td>string</td><td>Request body (Content-Type defaults to application/json)</td></tr>
<tr><td>regions</td><td>string[]</td><td>Regions to ping from: <code>eu-central</code>, <code>us-west</code>. Default: all</td></tr>
<tr><td>timeout_ms</td><td>number</td><td>Request timeout in milliseconds (default: 10000)</td></tr>
<tr><td>query</td><td>object</td><td>Query conditions — see below</td></tr>
</tbody>
</table>
<h3>Get</h3>
<div class="endpoint"><span class="method get">GET</span><span class="path">/monitors/:id</span></div>

View File

@ -295,7 +295,7 @@
<svg class="w-5 h-5 text-brand" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"/></svg>
</div>
<h3 class="font-semibold text-white mb-2">JSONPath & CSS selectors</h3>
<p class="text-sm text-gray-400 leading-relaxed">Drill into JSON responses with <code class="text-brand font-mono text-xs">$json</code> or scrape any HTML page with <code class="text-brand font-mono text-xs">$css</code> — no API required.</p>
<p class="text-sm text-gray-400 leading-relaxed">Drill into JSON responses with <code class="text-brand font-mono text-xs">$json</code> or scrape any HTML page with <code class="text-brand font-mono text-xs">$select</code> — no API required.</p>
</div>
<!-- Feature 3 -->
@ -473,13 +473,6 @@
</div>
</div>
<!-- CLI teaser -->
<div class="mt-8 text-center">
<div class="inline-flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle text-xs text-gray-500 font-mono">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"/></svg>
CLI coming soon — <span class="text-gray-400">pingql watch mon_a1b2c3</span>
</div>
</div>
</div>
</section>
@ -535,11 +528,7 @@
</li>
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-blue-400 shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
Webhook notifications
</li>
<li class="flex items-center gap-2">
<svg class="w-4 h-4 text-blue-400 shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
Priority support
Multi-region monitoring
</li>
</ul>
</div>