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/?q=api&page=46&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 4592 results for "api"(382ms)

blob_adminapp.tsx19 matches

@gaincue•Updated 1 week ago
70 const menuRef = useRef(null);
71 const isPublic = blob.key.startsWith("__public/");
72 const publicUrl = isPublic ? `${window.location.origin}/api/public/${encodeURIComponent(blob.key.slice(9))}` : null;
73
74 useEffect(() => {
234 setLoading(true);
235 try {
236 const response = await fetch(`/api/blobs?prefix=${encodeKey(searchPrefix)}&limit=${limit}`);
237 const data = await response.json();
238 setBlobs(data);
261 setBlobContentLoading(true);
262 try {
263 const response = await fetch(`/api/blob?key=${encodeKey(clickedBlob.key)}`);
264 const content = await response.text();
265 setSelectedBlob({ ...clickedBlob, key: decodeKey(clickedBlob.key) });
275 const handleSave = async () => {
276 try {
277 await fetch(`/api/blob?key=${encodeKey(selectedBlob.key)}`, {
278 method: "PUT",
279 body: editContent,
287 const handleDelete = async (key) => {
288 try {
289 await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
290 setBlobs(blobs.filter(b => b.key !== key));
291 if (selectedBlob && selectedBlob.key === key) {
304 const key = `${searchPrefix}${file.name}`;
305 formData.append("key", encodeKey(key));
306 await fetch("/api/blob", { method: "POST", body: formData });
307 const newBlob = { key, size: file.size, lastModified: new Date().toISOString() };
308 setBlobs([newBlob, ...blobs]);
326 try {
327 const fullKey = `${searchPrefix}${key}`;
328 await fetch(`/api/blob?key=${encodeKey(fullKey)}`, {
329 method: "PUT",
330 body: "",
341 const handleDownload = async (key) => {
342 try {
343 const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
344 const blob = await response.blob();
345 const url = window.URL.createObjectURL(blob);
360 if (newKey && newKey !== oldKey) {
361 try {
362 const response = await fetch(`/api/blob?key=${encodeKey(oldKey)}`);
363 const content = await response.blob();
364 await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
365 method: "PUT",
366 body: content,
367 });
368 await fetch(`/api/blob?key=${encodeKey(oldKey)}`, { method: "DELETE" });
369 setBlobs(blobs.map(b => b.key === oldKey ? { ...b, key: newKey } : b));
370 if (selectedBlob && selectedBlob.key === oldKey) {
380 const newKey = `__public/${key}`;
381 try {
382 const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
383 const content = await response.blob();
384 await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
385 method: "PUT",
386 body: content,
387 });
388 await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
389 setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
390 if (selectedBlob && selectedBlob.key === key) {
399 const newKey = key.slice(9); // Remove "__public/" prefix
400 try {
401 const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
402 const content = await response.blob();
403 await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
404 method: "PUT",
405 body: content,
406 });
407 await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
408 setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
409 if (selectedBlob && selectedBlob.key === key) {
554 onClick={() =>
555 copyToClipboard(
556 `${window.location.origin}/api/public/${encodeURIComponent(selectedBlob.key.slice(9))}`,
557 )}
558 className="text-blue-400 hover:text-blue-300 text-sm"
577 >
578 <img
579 src={`/api/blob?key=${encodeKey(selectedBlob.key)}`}
580 alt="Blob content"
581 className="max-w-full h-auto"

survivor-plan.mcp.json1 match

@prashamtrivedi•Updated 1 week ago
4 "command": "/root/Code/valTownProject/valTownMCPServer/build/valtown-mcp-linux",
5 "env": {
6 "VAL_TOWN_API_TOKEN": "vtwn_vXeoezF4CAugwkQ7RxxEXiHrNv9",
7 "VAL_TOWN_PREFER_CLI": "true"
8 }

survivor-planQuickGuidance.js1 match

@prashamtrivedi•Updated 1 week ago
29
30 try {
31 const response = await fetch('/api/quick-guidance', {
32 method: 'POST',
33 headers: {

survivor-planWeeklyReview.js6 matches

@prashamtrivedi•Updated 1 week ago
31 // Fetch tracks, tasks, and weekly review in parallel
32 const [tracksResponse, tasksResponse, weeklyReviewResponse] = await Promise.all([
33 fetch('/api/tracks'),
34 fetch('/api/tasks'),
35 fetch(`/api/weekly-reviews/${weekNumber}`)
36 ]);
37
227
228 try {
229 const response = await fetch('/api/weekly-reviews', {
230 method: 'POST',
231 headers: {
250 // Send weekly email
251 try {
252 await fetch('/api/send-weekly-email', {
253 method: 'POST'
254 });
271
272 try {
273 const response = await fetch('/api/weekly-review-feedback', {
274 method: 'POST',
275 headers: {

survivor-planSetupWizard.js1 match

@prashamtrivedi•Updated 1 week ago
81
82 try {
83 const response = await fetch('/api/user-status', {
84 method: 'POST',
85 headers: {

survivor-planDailyStandup.js4 matches

@prashamtrivedi•Updated 1 week ago
34 const fetchExistingLog = async () => {
35 try {
36 const response = await fetch(`/api/daily-logs/${date}`);
37
38 if (response.ok) {
111
112 try {
113 const response = await fetch('/api/daily-logs', {
114 method: 'POST',
115 headers: {
131 // Trigger email
132 try {
133 await fetch('/api/send-daily-email', {
134 method: 'POST'
135 });
156
157 try {
158 const response = await fetch('/api/daily-standup', {
159 method: 'POST'
160 });

survivor-planApp.js3 matches

@prashamtrivedi•Updated 1 week ago
30 try {
31 // Try to get user status
32 const response = await fetch('/api/user-status');
33
34 if (response.status === 404) {
56 try {
57 setIsLoading(true);
58 const response = await fetch('/api/migrate', {
59 method: 'POST',
60 headers: {
79 async function fetchInfo() {
80 try {
81 const response = await fetch('/api/info');
82 if (response.ok) {
83 const data = await response.json();

survivor-planTrackDetails.js8 matches

@prashamtrivedi•Updated 1 week ago
26 // Fetch track and tasks in parallel
27 const [trackResponse, tasksResponse] = await Promise.all([
28 fetch(`/api/tracks`),
29 fetch(`/api/tracks/${trackId}/tasks`)
30 ]);
31
55 const fetchTrackPrompt = async () => {
56 try {
57 const response = await fetch(`/api/tracks/${trackId}/prompt`);
58
59 if (response.ok) {
72
73 try {
74 const response = await fetch(`/api/tracks/${trackId}/guidance`, {
75 method: 'POST'
76 });
93 const handleTaskStatusChange = async (taskId, newStatus) => {
94 try {
95 const response = await fetch(`/api/tasks/${taskId}/status`, {
96 method: 'PUT',
97 headers: {
119 const handleTaskNotesChange = async (taskId, notes) => {
120 try {
121 const response = await fetch(`/api/tasks/${taskId}/notes`, {
122 method: 'PUT',
123 headers: {
145 const handleUpdateTrackStatus = async (newStatus) => {
146 try {
147 const response = await fetch(`/api/tracks/${trackId}`, {
148 method: 'PUT',
149 headers: {
170 const handlePromptUpdate = async () => {
171 try {
172 const response = await fetch(`/api/tracks/${trackId}/prompt`, {
173 method: 'PUT',
174 headers: {

survivor-planREADME.md12 matches

@prashamtrivedi•Updated 1 week ago
33
34- ValTown SQLite for data storage
35- Hono framework for API endpoints
36- Vercel AI SDK for AI interactions using Gemini models
37- Val Town email service for notifications
524. Perform weekly reviews every Sunday
53
54## API Endpoints
55
56- `/api/migrate` - Run database migrations
57- `/api/tracks` - Get and update tracks
58- `/api/tasks` - Manage tasks
59- `/api/daily-logs` - Daily progress tracking
60- `/api/weekly-reviews` - Weekly strategic reviews
61- `/api/user-status` - Personal situation management
62- `/api/track-prompts` - Customizable AI prompts
63- `/api/quick-guidance` - Get immediate AI guidance
64- `/api/send-daily-email` - Trigger daily email notifications
65- `/api/send-weekly-email` - Trigger weekly email notifications
66
67## AI Guidance Features

survivor-planSettings.js2 matches

@prashamtrivedi•Updated 1 week ago
80
81 try {
82 const response = await fetch('/api/user-status', {
83 method: 'POST',
84 headers: {
111 const handleSendEmail = async (type) => {
112 try {
113 const endpoint = type === 'daily' ? '/api/send-daily-email' : '/api/send-weekly-email';
114 const response = await fetch(endpoint, {
115 method: 'POST'

PassphraseAPI2 file matches

@wolf•Updated 2 days ago

openapi2 file matches

@stevekrouse•Updated 4 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)