Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$1?q=api&page=34&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 21603 results for "api"(2183ms)

postherousgenerate-keys.ts1 match

@charmaineβ€’Updated 4 days ago
24 console.log('πŸ” Generating RSA key pair for ActivityPub HTTP signatures...');
25
26 // Generate RSA key pair using Web Crypto API
27 const keyPair = await crypto.subtle.generateKey(
28 {

postherousACTIVITYPUB.md1 match

@charmaineβ€’Updated 4 days ago
286- [WebFinger Specification](https://tools.ietf.org/html/rfc7033)
287- [ActivityStreams Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/)
288- [Mastodon API Documentation](https://docs.joinmastodon.org/spec/activitypub/)
289
290---

cognitoCallbackREADME.md1 match

@nholdenβ€’Updated 4 days ago
94
95### Copy Function Not Working
96- Modern browsers require HTTPS for clipboard API
97- Val Town URLs use HTTPS by default, so this should work automatically

test123main.tsx2 matches

@joinβ€’Updated 4 days ago
26 <title>Floating Vertical Stream</title>
27
28 <link rel="preconnect" href="https://fonts.googleapis.com">
29 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
30 <link href="https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Bungee+Spice&family=Creepster&family=Metal+Mania&family=Nosifier&family=Press+Start+2P&family=Lobster&display=swap" rel="stylesheet">
31
32<style>

postherousupload.html4 matches

@kerryrmβ€’Updated 4 days ago
178
179 <div class="mt-4 pt-4 border-t border-gray-300">
180 <h4 class="text-sm font-medium text-gray-800 mb-2">API Endpoints</h4>
181 <div class="grid md:grid-cols-2 gap-4 text-xs text-gray-600">
182 <div>
184 </div>
185 <div>
186 <code class="bg-white p-1 rounded">GET /api/posts/slug/images</code> - Get post images
187 </div>
188 </div>
383
384 try {
385 const response = await fetch(`/api/images?password=${encodeURIComponent(password)}&limit=${allImagesLimit}&offset=${allImagesOffset}`);
386 const data = await response.json();
387
586 if (altText) formData.append('altText', altText);
587
588 const response = await fetch('/api/images/upload', {
589 method: 'POST',
590 body: formData

postheroustest-activitypub-inbox.ts3 matches

@kerryrmβ€’Updated 4 days ago
96
97 // Check activity counts for the post
98 const activityResponse = await fetch(`${BASE_URL}/api/posts/test/activities`);
99 if (activityResponse.ok) {
100 const activityData = await activityResponse.json();
139
140 // Check activity counts for the post
141 const activityResponse = await fetch(`${BASE_URL}/api/posts/test/activities`);
142 if (activityResponse.ok) {
143 const activityData = await activityResponse.json();
212 // Get final activity counts for test post
213 try {
214 const activityResponse = await fetch(`${BASE_URL}/api/posts/test/activities`);
215 if (activityResponse.ok) {
216 const activityData = await activityResponse.json();

postherousSETUP.md5 matches

@kerryrmβ€’Updated 4 days ago
25- **Individual Posts**: `/post/[slug]` (auto-generated from title)
26- **RSS Feed**: `/rss`
27- **API**: `/api/posts` for JSON data
28
29### 3. Current Features
41βœ… **Technical Features**
42- Static HTML generation (no client-side JavaScript)
43- Hono backend API
44- TailwindCSS styling
45- Error handling and logging
118- Check Val Town logs for email processing
119- Use `/health` endpoint for status checks
120- Monitor `/api/posts` for data integrity
121
122## Architecture Overview
127 Database (SQLite)
128 ↓
129 backend/index.ts (HTTP API + HTML Generation)
130 ↓
131 Static HTML (TailwindCSS)
144- Check Val Town logs for debugging
145- Use the `/health` endpoint to verify system status
146- Test individual components using the API endpoints
147
148Your email blog platform is ready to use! Send your first email to start publishing.

postherousSECURITY.md2 matches

@kerryrmβ€’Updated 4 days ago
137- Document your allowed email addresses
138
139## API Endpoints
140
141### Verification Endpoint
151### Security Headers
152All verification pages include:
153- Proper HTML escaping to prevent XSS
154- Responsive design for mobile verification
155- Clear success/error messaging

postherousREADME.md16 matches

@kerryrmβ€’Updated 4 days ago
27
28### Backend (`/backend/`)
29- `index.ts` - Main Hono server with HTML generation and API routes βœ…
30- `database/` - SQLite schema and query functions βœ…
31- `services/` - External service integrations βœ…
125Without BASE_URL set, the system will use the default Val Town URL for ActivityPub federation.
126
127## πŸ“Š API Endpoints
128
129- `GET /` - Main blog interface (with ActivityPub Link header)
132- `GET /images/:filename` - Serve uploaded images βœ…
133- `GET /rss` - RSS 2.0 feed
134- `GET /api/posts` - JSON API for posts
135- `GET /api/posts/:slug` - JSON API for single post
136- `POST /api/images/upload` - Upload image endpoint βœ…
137- `GET /api/posts/:slug/images` - Get images for a specific post βœ…
138- `GET /api/images/user/:email` - Get images uploaded by a user βœ…
139- `GET /api/images` - Get all images (admin endpoint) βœ…
140- `DELETE /api/images/:filename` - Delete an image βœ…
141- `GET /websub` - WebSub subscription endpoint
142- `GET /.well-known/webfinger` - WebFinger discovery for ActivityPub βœ…
146- `GET /followers` - ActivityPub followers collection (with pagination support) βœ…
147- `GET /followers-list` - Human-readable followers page βœ…
148- `GET /api/followers` - JSON API for followers list βœ…
149- `GET /following` - ActivityPub following collection βœ…
150- `POST /inbox` - ActivityPub inbox (processes Follow, Like, Announce, Undo) βœ…
151- `GET /api/posts/:slug/activities` - Get activity counts (likes, shares, replies) βœ…
152- `GET /verify-email` - Email verification endpoint βœ…
153- `GET /health` - Health check
205- **URL Generation**: Clean `/images/filename` URLs for serving images
206
207### Image API Usage
208
209```javascript
216formData.append('postSlug', 'my-blog-post'); // optional
217
218const response = await fetch('/api/images/upload', {
219 method: 'POST',
220 body: formData
222
223// Get images for a post (no password required)
224const images = await fetch('/api/posts/my-post-slug/images').then(r => r.json());
225
226// Get images by user (requires password)
227const userImages = await fetch('/api/images/user/user@example.com?password=your-upload-password').then(r => r.json());
228
229// Get all images (requires password)
230const allImages = await fetch('/api/images?password=your-upload-password&limit=50').then(r => r.json());
231```
232

postherousindex.ts16 matches

@kerryrmβ€’Updated 4 days ago
660});
661
662// API: Get all posts
663app.get("/api/posts", async c => {
664 try {
665 await ensureDbInitialized();
675});
676
677// API: Get single post
678app.get("/api/posts/:slug", async c => {
679 try {
680 await ensureDbInitialized();
696});
697
698// // API: Delete posts by author name (for cleanup)
699// app.delete("/api/posts/author/:authorName", async c => {
700// try {
701// await ensureDbInitialized();
831 </a>
832 <div class="text-sm text-gray-500">
833 <a href="/api/followers" class="hover:text-gray-700">JSON API</a>
834 <span class="mx-2">β€’</span>
835 <a href="/followers" class="hover:text-gray-700">ActivityPub</a>
849});
850
851// API: Get followers list (human-readable)
852app.get("/api/followers", async c => {
853 try {
854 await ensureDbInitialized();
875});
876
877// API: Get activity counts for a post
878app.get("/api/posts/:slug/activities", async c => {
879 try {
880 await ensureDbInitialized();
1644
1645// Upload image endpoint
1646app.post("/api/images/upload", async c => {
1647 try {
1648 await ensureDbInitialized();
1706
1707// Get images for a specific post
1708app.get("/api/posts/:slug/images", async c => {
1709 try {
1710 await ensureDbInitialized();
1733
1734// Get images uploaded by a user
1735app.get("/api/images/user/:email", async c => {
1736 try {
1737 await ensureDbInitialized();
1767
1768// Delete an image
1769app.delete("/api/images/:filename", async c => {
1770 try {
1771 await ensureDbInitialized();
1791
1792// Get all images (admin endpoint)
1793app.get("/api/images", async c => {
1794 try {
1795 await ensureDbInitialized();

github-api8 file matches

@cricks_unmixed4uβ€’Updated 7 hours ago
Very incomplete collection of useful GitHub API adapters

telegram1 file match

@leduduβ€’Updated 2 days ago
中转telegram api
api
socialdata
Affordable & reliable alternative to Twitter API: ➑️ Access user profiles, tweets, followers & timeline data in real-time ➑️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➑️ Simple integration