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=fetch&page=657&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 7895 results for "fetch"(1669ms)

interleavingmain.tsx1 match

@petermillspaugh•Updated 1 year ago
36 fillBlank: FILL_BLANK,
37 quiz: QUIZ,
38 fetchHtml: (email: string, lesson: number) =>
39 generateLessonHtml({
40 email,

spacedRepetitionmain.tsx1 match

@petermillspaugh•Updated 1 year ago
92 fillBlank: FILL_BLANK,
93 quiz: QUIZ,
94 fetchHtml: (email: string, lesson: number) =>
95 generateLessonHtml({
96 email,

notionSiteProxymain.tsx1 match

@chet•Updated 1 year ago
17
18 url.host = notionDomain;
19 const response = await fetch(url, req);
20
21 const contents = await response.text();

getMyValTownUserUUIDmain.tsx1 match

@zarutian•Updated 1 year ago
8 **/
9export const getMyValTownUserUUID = async () => {
10 return (await (await fetch(`${VALTOWN_API_URL}/me`, {
11 headers: {
12 Authorization: `Bearer ${Deno.env.get("valtown")}`,

masto_timeout_prmain.tsx1 match

@andreterron•Updated 1 year ago
16Deno.exit(0);
17
18// Fetching reports
19// const reports = await masto.v1.admin.reports.list();
20// console.log(reports);

trendingreposmain.tsx3 matches

@jamesw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Helper function to format the date for GitHub API query
8}
9
10// Function to fetch top GitHub repositories based on stars and creation date
11async function topGitHubRepos(stars: number, daysAgo: number, timeframeDescription: string) {
12 const date = formatDate(daysAgo);
13 const query = `stars:>${stars} created:>${date}`;
14 const response = await fetch(
15 `https://api.github.com/search/repositories?q=${query}&sort=stars&order=desc&per_page=10`,
16 )

prune_valmain.tsx5 matches

@saolsen•Updated 1 year ago
5 commit = false,
6): Promise<void> {
7 const resp = await fetch(`https://api.val.town/v1/vals/${val_id}`, {
8 headers: {
9 Authorization: "Bearer " + Deno.env.get("valtown"),
11 });
12 if (resp.status !== 200) {
13 console.error("Error fetching val:", resp);
14 return;
15 }
30 for (const v of versions_to_delete) {
31 console.log(`Deleting Version ${v}`);
32 const resp = await fetch(
33 `https://api.val.town/v1/vals/${val_id}/versions/${v}`,
34 {
41 case 200: {
42 if (commit) {
43 const resp = await fetch(
44 `https://api.val.town/v1/vals/${val_id}/versions/${v}`,
45 {
64 }
65 default:
66 console.error("Error fetching val version:", resp);
67 return;
68 }

manifold_daily_loan_collectormain.tsx1 match

@case•Updated 1 year ago
1export default async function() {
2 const res = await fetch("https://api.manifold.markets/request-loan", {
3 headers: {
4 Authorization: `Key ${Deno.env.get("manifoldApiKey")}`,

untitled_indigoMolluskmain.tsx4 matches

@willthereader•Updated 1 year ago
1import { constructReadTangleUrl } from "https://esm.town/v/willthereader/constructReadTangleUrl";
2import { fetchComments } from "https://esm.town/v/willthereader/fetchComments";
3import { FilterCommentsVal } from "https://esm.town/v/willthereader/FilterCommentsVal";
4import { formattingEmailContent } from "https://esm.town/v/willthereader/formattingEmailContent";
5import { logMessage } from "https://esm.town/v/willthereader/logMessage";
6import { post_idFetcher } from "https://esm.town/v/willthereader/post_idFetcher";
7
8export async function Sendingemail() {
11 let lastRunDate = new Date("2023-11-10T19:27:25.547Z");
12 lastRunDate = new Date();
13 const post_ids = await post_idFetcher();
14 // console.log("post_ids: ", post_ids);
15 const firstTwoPost_ids = post_ids.slice(2, 3);
17 // console.log("ReadTangleUrl: ", ReadTangleUrl);
18 // return ReadTangleUrl;
19 const Comments = await fetchComments(ReadTangleUrl);
20 // console.log("Comments: ", Comments);
21 return Comments;

untitled_redTurtlemain.tsx1 match

@devdoshi•Updated 1 year ago
72app.get("/ui", swaggerUI({ url: "/doc" }));
73
74export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago