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/$%7Bart_info.art.src%7D?q=api&page=52&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 11499 results for "api"(611ms)

myApi1 file match

@vandyandโ€ขUpdated 1 year ago

myApi1 file match

@scottmcclungโ€ขUpdated 1 year ago

myApi1 file match

@elrey741โ€ขUpdated 1 year ago

myApi1 file match

@jfbouzereauโ€ขUpdated 1 year ago

myApi1 file match

@elsurudoโ€ขUpdated 1 year ago

myApi1 file match

@klmklmโ€ขUpdated 1 year ago

myApi1 file match

@shaparderโ€ขUpdated 1 year ago

myApi1 file match

@ridgeโ€ขUpdated 1 year ago

myApi1 file match

@wondayโ€ขUpdated 1 year ago

myApi1 file match

@daleseoโ€ขUpdated 1 year ago
129
130 try {
131 const url = `https://api.github.com/repos/${repo}/issues/${prNumber}/assignees`;
132 console.log("๐Ÿ” Sending assignee request to:", url);
133
145 });
146
147 console.log("๐Ÿ” GitHub API response status:", response.status);
148
149 if (response.ok) {
155 try {
156 const error = await response.json();
157 console.error("โŒ GitHub API error:", JSON.stringify(error));
158 errorMessage = error.message || errorMessage;
159
168 } catch (e) {
169 const errorText = await response.text();
170 console.error("โŒ GitHub API error text:", errorText);
171 }
172 return { success: false, message: errorMessage };
173 }
174 } catch (error) {
175 console.error("โŒ Exception during API call:", error);
176 return { success: false, message: error.message };
177 }
34};
35
36// Types for Slack API
37type SlackMessage = {
38 blocks: any[];
323
324 // Get PR details
325 const url = `https://api.github.com/repos/${repo}/pulls/${prNumber}`;
326 console.log("๐Ÿ” Fetching from GitHub API URL:", url);
327
328 let response;
335 },
336 });
337 console.log("๐Ÿ” GitHub API response received");
338 console.log("๐Ÿ” Response status:", response.status);
339 console.log("๐Ÿ” Response status text:", response.statusText);
346
347 if (!response.ok) {
348 console.error(`โŒ GitHub API error: ${response.status} ${response.statusText}`);
349
350 let errorText;
351 try {
352 errorText = await response.text();
353 console.error("โŒ GitHub API error response:", errorText);
354
355 try {
356 // Try to parse as JSON for more details
357 const errorJson = JSON.parse(errorText);
358 console.error("โŒ GitHub API error details:", JSON.stringify(errorJson));
359 } catch (e) {
360 // Not JSON, that's fine
370 try {
371 data = await response.json();
372 console.log("๐Ÿ” Successfully parsed GitHub API response");
373 } catch (jsonError) {
374 console.error("โŒ Failed to parse GitHub API response:", jsonError);
375
376 try {
384 }
385
386 throw new Error(`Failed to parse GitHub API response: ${jsonError.message}`);
387 }
388
400}
401
402// Merge a PR via GitHub API
403async function mergePR(repo: string, prNumber: number) {
404 console.log(`๐Ÿ” Starting mergePR for PR #${prNumber} in ${repo}`);
448
449 // Proceed with merge
450 const url = `https://api.github.com/repos/${repo}/pulls/${prNumber}/merge`;
451 console.log("๐Ÿ” Sending merge request to:", url);
452
468 body: mergeBody,
469 });
470 console.log("๐Ÿ” Merge API response received");
471 console.log("๐Ÿ” Response status:", response.status);
472 console.log("๐Ÿ” Response status text:", response.statusText);
638 body: JSON.stringify(message),
639 });
640 console.log("๐Ÿ” Slack API response received");
641 console.log("๐Ÿ” Response status:", response.status);
642 console.log("๐Ÿ” Response status text:", response.statusText);
649
650 if (!response.ok) {
651 console.error(`โŒ Slack API error: ${response.status} ${response.statusText}`);
652
653 let errorText;
654 try {
655 errorText = await response.text();
656 console.error("โŒ Slack API error response:", errorText);
657 } catch (e) {
658 console.error("โŒ Could not read error response:", e);
papimark21
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