-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.html
More file actions
85 lines (78 loc) · 5.06 KB
/
Copy pathapi.html
File metadata and controls
85 lines (78 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://static.cloudflareinsights.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https://*.supabase.co wss://*.supabase.co https://cdn.jsdelivr.net https://cloudflareinsights.com https://static.cloudflareinsights.com; frame-src *;" />
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>API - K. Notes</title>
<link href="assets/css/styles.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="assets/img/logo.png" />
</head>
<body class="font-body-md text-body-md text-on-surface">
<div class="max-w-[85%] mx-auto bg-surface-bright pb-8 mt-2">
<header
class="bg-[#ff6600] text-black text-sm rounded-none w-full flat no shadows flex items-center justify-between px-2 py-0.5 max-w-[85%] mx-auto"
style="max-width: 100%;">
<div class="flex items-center gap-1 w-full">
<a href="index.html" class="font-bold text-black px-1 mr-2 hover:underline" title="K.Notes">K. Notes</a>
<div class="flex flex-wrap items-center gap-1 text-black text-[13px]">
<a class="hover:underline" href="index.html">feed</a> |
<a class="hover:underline" href="comments.html">comments</a> |
<a class="hover:underline" href="ask.html">ask</a> |
<a class="hover:underline" href="show.html">show</a> |
<a class="hover:underline" href="submit.html">submit</a> |
<a class="hover:underline" href="leaderboard.html">leaders</a>
</div>
<div class="ml-auto text-black text-[13px] flex items-center gap-4"> <a
class="hover:underline text-black" href="login.html">login</a> </div>
</div>
</header>
<main class="bg-[#f6f6ef] p-8 min-h-[50vh] text-[14px] text-gray-800 leading-relaxed">
<b class="text-black text-lg block mb-4">API Documentation</b>
<p class="mb-4">
We provide a simple read-only API for retrieving stories and comments.
</p>
<p class="mb-4 font-mono text-xs bg-gray-200 p-2 rounded">GET /api/v1/topstories</p>
<p class="mb-4 ml-4">
Returns the current top 30 stories on the front page.
</p>
<p class="mb-4 font-mono text-xs bg-gray-200 p-2 rounded">GET /api/v1/item/{id}</p>
<p class="mb-4 ml-4">
Returns details for a specific item (story or comment).
</p>
<p class="mt-8 italic">
Note: This API is currently powered by our Supabase backend. Direct access is restricted to
authenticated sessions.
</p>
</main>
<footer
class="bg-[#f6f6ef] dark:bg-stone-900 text-[#ff6600] text-xs text-gray-600 rounded-none border-t-2 border-[#ff6600] mt-4 flat no shadows flex flex-col items-center gap-2 py-8 w-full max-w-[85%] mx-auto"
style="max-width: 100%;">
<div class="flex justify-center w-full mb-2">
<span class="text-[10px] text-gray-500 font-normal">By Khushaank Gupta</span>
</div>
<div class="flex flex-wrap justify-center gap-2 text-gray-600 mb-4">
<a class="hover:underline text-gray-600" href="guidelines.html">Guidelines</a> |
<a class="hover:underline text-gray-600" href="faq.html">FAQ</a> |
<a class="hover:underline text-gray-600" href="lists.html">Lists</a> |
<a class="hover:underline text-gray-600" href="api.html">API</a> |
<a class="hover:underline text-gray-600" href="security.html">Security</a> |
<a class="hover:underline text-gray-600" href="legal.html">Legal</a> |
<a class="hover:underline text-gray-600" href="about.html">About</a> |
<a class="hover:underline text-gray-600" href="contact.html">Feedback</a>
</div>
<form id="footer-search-form" class="flex flex-col items-center gap-2"
onsubmit="event.preventDefault(); window.location.href='search.html?search='+document.getElementById('footer-search-input').value;">
<div class="flex items-center gap-2"><span class="text-gray-500 text-xs">Search:</span><input
type="text" id="footer-search-input"
class="border border-gray-400 px-2 py-0.5 text-xs rounded-sm focus:outline-none focus:border-[#ff6600] text-black w-48">
</div>
<div id="trending-searches" class="text-[10px] text-gray-400 flex gap-2"></div>
</form>
</footer>
</div>
<script type="module" src="assets/js/session.js"></script>
<script src="assets/js/exit-interceptor.js"></script>
</body>
</html>