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=38&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 18265 results for "api"(1011ms)

cschicklikeCurrentTrack.tsx3 matches

@cschick•Updated 2 days ago
5
6 // Get new access token
7 const tokenRes = await fetch("https://accounts.spotify.com/api/token", {
8 method: "POST",
9 headers: {
21
22 // Get currently playing song
23 const currentRes = await fetch("https://api.spotify.com/v1/me/player/currently-playing", {
24 headers: {
25 Authorization: `Bearer ${access_token}`,
36
37 // Like the song
38 const likeRes = await fetch(`https://api.spotify.com/v1/me/tracks`, {
39 method: "PUT",
40 headers: {

Change-Logs-Generatorprocess-commits.tsx3 matches

@hussufo•Updated 2 days ago
38Enhanced logging system for better debugging
39Fixed occasional 500 error with the /sessions endpoint
40UI docker image now accepts dynamic API URLs for custom deploys
41Fixes to re-render bugs that were causing some state update delays
42Fixes requests ordering from FE to preload data for a snappier UI
181 });
182
183 console.log(`GitHub API response status: ${response.status}`);
184 console.log(`Raw commit count: ${response.data.length}`);
185
186 return response.data;
187 } catch (error) {
188 console.error("GitHub API Error:", error);
189 throw error;
190 }
Change-Logs-Generator

Change-Logs-Generatorprocess-commits.tsx3 matches

@charmaine•Updated 2 days ago
38Enhanced logging system for better debugging
39Fixed occasional 500 error with the /sessions endpoint
40UI docker image now accepts dynamic API URLs for custom deploys
41Fixes to re-render bugs that were causing some state update delays
42Fixes requests ordering from FE to preload data for a snappier UI
181 });
182
183 console.log(`GitHub API response status: ${response.status}`);
184 console.log(`Raw commit count: ${response.data.length}`);
185
186 return response.data;
187 } catch (error) {
188 console.error("GitHub API Error:", error);
189 throw error;
190 }

Townie-09useUser.tsx1 match

@jxnblk•Updated 2 days ago
1import { useState, useEffect } from "react";
2
3const USER_ENDPOINT = "/api/user";
4
5export function useUser() {

Townie-09user-summary.ts1 match

@jxnblk•Updated 2 days ago
20 SUM(num_images) as total_images
21 FROM ${USAGE_TABLE}
22 WHERE our_api_token = 1
23 GROUP BY user_id, username
24 ORDER BY total_price DESC

Townie-09useProject.tsx2 matches

@jxnblk•Updated 2 days ago
1import { useState, useEffect } from "react";
2
3const PROJECT_ENDPOINT = "/api/project";
4const FILES_ENDPOINT = "/api/project-files";
5
6export function useProject(projectId: string, branchId?: string) {

Townie-09useProjects.tsx1 match

@jxnblk•Updated 2 days ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/projects-loader";
4
5export function useProjects() {

Townie-09useCreateProject.tsx1 match

@jxnblk•Updated 2 days ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/create-project";
4
5export function useCreateProject() {

Townie-09useCreateBranch.tsx1 match

@jxnblk•Updated 2 days ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/create-branch";
4
5export function useCreateBranch(projectId: string) {

Townie-09useChatLogic.ts2 matches

@jxnblk•Updated 2 days ago
17 project,
18 branchId,
19 // anthropicApiKey,
20 // bearerToken,
21 selectedFiles,
39 status,
40 } = useChat({
41 api: "/api/send-message",
42 body: {
43 project,

github-api1 file match

@cricks_unmixed4u•Updated 6 hours ago

beeminder-api4 file matches

@cricks_unmixed4u•Updated 6 hours ago
snartapi
apiry