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/image-url.jpg%20%22Image%20title%22?q=api&page=119&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 13361 results for "api"(1419ms)

FirstProjectindex.js4 matches

@MiracleSanctuary•Updated 4 days ago
58const fetchJobs = async () => {
59 try {
60 const response = await fetch('/api/jobs');
61 if (!response.ok) throw new Error('Failed to fetch jobs');
62
104 };
105
106 const response = await fetch('/api/jobs', {
107 method: 'POST',
108 headers: {
135const fetchChatMessages = async () => {
136 try {
137 const response = await fetch('/api/chat');
138 if (!response.ok) throw new Error('Failed to fetch chat messages');
139
202
203 try {
204 const response = await fetch('/api/chat', {
205 method: 'POST',
206 headers: {

FirstProjectREADME.md1 match

@MiracleSanctuary•Updated 4 days ago
37## Technologies Used
38
39- Backend: Hono (API framework)
40- Database: SQLite
41- Frontend: HTML, JavaScript, Tailwind CSS

lyristmain.ts12 matches

@g•Updated 4 days ago
3import type { SearchRes, LyricsRes } from './types.ts'
4
5// Define the type for our API response
6interface ApiResponse {
7 title: string;
8 artist: string;
15
16// CORS middleware to allow requests from any origin
17app.use('/api/*', cors());
18
19// Define the GET route
20app.get('/api/:track_name/:artist_name?', async (c) => {
21 const trackName = c.req.param('track_name');
22 const artistNameParam = c.req.param('artist_name'); // This will be undefined if not provided
26 }
27
28 // Construct the query for the suggest API
29 // If artist_name is provided, include it in the query for better accuracy.
30 // The suggest API seems to work well with "track artist" format.
31 const query = artistNameParam ? `${trackName} ${artistNameParam}` : trackName;
32
33 try {
34 // 1. Fetch suggestions
35 const suggestUrl = `https://api.lyrics.ovh/suggest/${encodeURIComponent(query)}`;
36 console.log(`Fetching suggestions from: ${suggestUrl}`);
37 const suggestResponse = await fetch(suggestUrl);
59
60 // 3. Fetch lyrics
61 const lyricsUrl = `https://api.lyrics.ovh/v1/${encodeURIComponent(actualArtist)}/${encodeURIComponent(actualTitle)}`;
62 console.log(`Fetching lyrics from: ${lyricsUrl}`);
63 const lyricsResponse = await fetch(lyricsUrl);
78 console.log('Lyrics received (first 50 chars):', lyricsData.lyrics?.substring(0, 50) + "...");
79
80 if (lyricsData.error) { // Handle cases where API returns 200 but with an error message in JSON
81 return c.json({ error: lyricsData.error }, 404);
82 }
88 lyrics: "(No lyrics available or instrumental)",
89 source: "NOT_A_SOURCE",
90 } as ApiResponse, 200);
91 }
92
93
94 // 4. Combine data and form the response
95 const responsePayload: ApiResponse = {
96 title: actualTitle,
97 artist: actualArtist,
111// Basic route for testing if the worker is up
112app.get('/', (c) => {
113 return c.text('Hono Lyrics API worker is running!');
114});
115

JobPlatformindex.ts2 matches

@MiracleSanctuary•Updated 4 days ago
36
37// Mount routes
38app.route("/api/jobs", jobRoutes);
39app.route("/api/chat", chatRoutes);
40app.route("/", staticRoutes);
41

JobPlatformapp.js5 matches

@MiracleSanctuary•Updated 4 days ago
85async function loadJobs() {
86 try {
87 const response = await fetch('/api/jobs');
88 if (!response.ok) throw new Error('Failed to fetch jobs');
89
120 };
121
122 const response = await fetch('/api/jobs', {
123 method: 'POST',
124 headers: {
187async function loadChatMessages() {
188 try {
189 const response = await fetch('/api/chat');
190 if (!response.ok) throw new Error('Failed to fetch chat messages');
191
235 if (lastChatTimestamp) {
236 try {
237 const response = await fetch(`/api/chat/recent?since=${lastChatTimestamp}`);
238 if (!response.ok) throw new Error('Failed to fetch recent messages');
239
278
279 try {
280 const response = await fetch('/api/chat', {
281 method: 'POST',
282 headers: {

JobPlatformREADME.md1 match

@MiracleSanctuary•Updated 4 days ago
38## Technologies Used
39
40- Backend: Hono (API framework)
41- Database: SQLite
42- Frontend: HTML, JavaScript, Tailwind CSS

lyristlyrics.ts3 matches

@g•Updated 4 days ago
35}
36
37interface GeniusApiResponse {
38 response: {
39 sections: Array<{
57): Promise<LyricsResponse> => {
58 try {
59 const target = `https://genius.com/api/search/multi?per_page=1&q=${
60 encodeURIComponent(
61 searchTerm,
72 };
73
74 // Make the API request
75 const response = await proxiedFetch(target, { headers });
76 const data = await response.json();

AkashREADME.md1 match

@Akashashn•Updated 4 days ago
16- `JobRequirement` - Job requirement data structure
17- `ScoringResult` - Result of scoring a resume against a job requirement
18- `ApiResponse` - Standard API response format

AkashREADME.md10 matches

@Akashashn•Updated 4 days ago
5## Files
6
7- `index.ts` - Main API entry point with Hono framework (HTTP trigger)
8- `database.ts` - SQLite database operations for storing resumes and job requirements
9- `parser.ts` - Resume parsing logic using OpenAI's GPT models
10- `scorer.ts` - Candidate scoring algorithms and feedback generation
11
12## API Endpoints
13
14### Resumes
15
16- `POST /api/resumes` - Upload a new resume
17- `GET /api/resumes` - Get all resumes
18- `GET /api/resumes/:id` - Get a specific resume by ID
19
20### Job Requirements
21
22- `POST /api/jobs` - Create a new job requirement
23- `GET /api/jobs` - Get all job requirements
24- `GET /api/jobs/:id` - Get a specific job requirement by ID
25
26### Scoring
27
28- `POST /api/score` - Score a single resume against a job requirement
29- `POST /api/score/batch` - Score multiple resumes against a job requirement
30
31## Database Schema

Akashindex.ts9 matches

@Akashashn•Updated 4 days ago
59});
60
61// API Routes
62
63// Resume endpoints
64app.post("/api/resumes", async c => {
65 try {
66 const body = await c.req.json();
101});
102
103app.get("/api/resumes", async c => {
104 try {
105 const resumes = await getAllResumes();
111});
112
113app.get("/api/resumes/:id", async c => {
114 try {
115 const id = parseInt(c.req.param("id"));
131
132// Job requirement endpoints
133app.post("/api/jobs", async c => {
134 try {
135 const body = await c.req.json();
164});
165
166app.get("/api/jobs", async c => {
167 try {
168 const jobs = await getAllJobRequirements();
174});
175
176app.get("/api/jobs/:id", async c => {
177 try {
178 const id = parseInt(c.req.param("id"));
194
195// Scoring endpoint
196app.post("/api/score", async c => {
197 try {
198 const body = await c.req.json();
244
245// Batch scoring endpoint
246app.post("/api/score/batch", async c => {
247 try {
248 const body = await c.req.json();

vapi-minutes-db1 file match

@henrywilliams•Updated 3 days ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 3 days ago
mux
Your friendly, neighborhood video API.
api