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=1&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 11519 results for "api"(3607ms)

GitHub-PR-AutomationREADME.md1 match

@twschiller•Updated 57 mins ago
79
801. **Create a Slack App**:
81 - Go to [Slack API Apps](https://api.slack.com/apps) → Create New App → From scratch
82 - Name your app and select your workspace
83 - Click "Create App"
32};
33
34// Types for Slack API
35type SlackMessage = {
36 blocks: any[];
219
220 // Get PR details
221 const url = `https://api.github.com/repos/${repo}/pulls/${prNumber}`;
222
223 let response;
241 return await response.json();
242 } catch (jsonError) {
243 throw new Error(`Failed to parse GitHub API response: ${jsonError.message}`);
244 }
245}
246
247// Merge a PR via GitHub API
248async function mergePR(repo: string, prNumber: number) {
249 const token = Deno.env.get("GITHUB_TOKEN");
282
283 // Proceed with merge
284 const url = `https://api.github.com/repos/${repo}/pulls/${prNumber}/merge`;
285
286 const response = await fetch(url, {
137
138 try {
139 const url = `https://api.github.com/repos/${repo}/pulls/${prNumber}`;
140
141 const response = await fetch(url, {
166 }
167 } catch (error) {
168 console.error("Exception during API call:", error);
169 return { success: false, message: error.message };
170 }
162 }
163
164 const url = `https://api.github.com/repos/${repo}/issues/${issueNumber}`;
165
166 const response = await fetch(url, {
195
196 try {
197 const url = `https://api.github.com/repos/${repo}/issues/${prNumber}/labels`;
198
199 const response = await fetch(url, {
99
100 try {
101 const url = `https://api.github.com/repos/${repo}/issues/${prNumber}/assignees`;
102
103 const response = await fetch(url, {
132 }
133 } catch (error) {
134 console.error("Exception during API call:", error);
135 return { success: false, message: error.message };
136 }
GitHub-PR-Automation

GitHub-PR-AutomationREADME.md1 match

@charmaine•Updated 2 hours ago
79
801. **Create a Slack App**:
81 - Go to [Slack API Apps](https://api.slack.com/apps) → Create New App → From scratch
82 - Name your app and select your workspace
83 - Click "Create App"

NowPlayingGrabbermain.tsx2 matches

@thunder75•Updated 2 hours ago
2import querystring from "npm:querystring";
3
4const NOW_PLAYING_ENDPOINT = "https://api.spotify.com/v1/me/player/currently-playing";
5const TOKEN_ENDPOINT = "https://accounts.spotify.com/api/token";
6
7const client_id = Deno.env.get("spotify_client_id");

instagram-toolsfollows-check.jsx1 match

@julianpera•Updated 4 hours ago
4export default async function handleCron(interval) {
5 const following = await fetchCookie(
6 "https://www.instagram.com/api/v1/friendships/375942300/following/?query=miguelse10",
7 {
8 method: "GET",

NowPlayingGrabbermain.tsx2 matches

@anthropium•Updated 4 hours ago
2import querystring from "npm:querystring";
3
4const NOW_PLAYING_ENDPOINT = "https://api.spotify.com/v1/me/player/currently-playing";
5const TOKEN_ENDPOINT = "https://accounts.spotify.com/api/token";
6
7const client_id = Deno.env.get("client_id");

telegramBotStartersetupHook.tsx2 matches

@asdfg•Updated 5 hours ago
11 try {
12 const botToken = process.env.TELEGRAM_BOT_TOKEN;
13 const response = await fetch(`https://api.telegram.org/bot${botToken}/setWebhook`, {
14 method: "POST",
15 headers: { "Content-Type": "application/json" },
37 const botToken = process.env.TELEGRAM_BOT_TOKEN;
38
39 const response = await fetch(`https://api.telegram.org/bot${botToken}/getWebhookInfo`);
40 const result = await response.json();
41 return result;

gptApiTemplate2 file matches

@charmaine•Updated 1 day ago

mod-interview-api1 file match

@twschiller•Updated 1 day ago
aquapi
apiv1