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/$%7Bsuccess?q=fetch&page=713&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 8446 results for "fetch"(2199ms)

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;

twemojimain.tsx2 matches

@stevedylandev•Updated 1 year ago
70
71 if (typeof api === "function") {
72 return (emojiCache[key] = fetch(api(code)).then(async r => r.text()));
73 }
74 return (emojiCache[key] = fetch(`${api}${code.toUpperCase()}.svg`).then(async r =>
75 r.text()));
76}

getWeathermain.tsx2 matches

@chet•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
10 const q = encodeURIComponent(query);
11 const apiUrl = `https://api.weatherapi.com/v1/forecast.json?key=${weatherApiKey}&q=${q}&days=${days}`;
12 const response = await fetch(apiUrl);
13 const data: any = await response.json();
14 return data;

greenhouseToRSSmain.tsx2 matches

@donmccurdy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function greenhouseToRSS(req: Request) {
7 const mode = searchParams.get("mode");
8 const SOURCE_URL = `https://boards-api.greenhouse.io/v1/boards/${account}/jobs`;
9 const { jobs: sourceJobs } = await fetch(SOURCE_URL).then((res) => res.json());
10
11 const getFeedLink = (mode) => `https://donmccurdy-greenhousetorss.express.val.run/?account=${account}&mode=${mode}`;

leverToRSSmain.tsx2 matches

@donmccurdy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function leverToRSS(req: Request) {
9 const SOURCE_URL = `https://api.lever.co/v0/postings/${account}?mode=xml`;
10 const parser = new XMLParser();
11 const sourceXML = await fetch(SOURCE_URL).then((res) => res.text());
12
13 const { job: sourceJobs } = parser.parse(sourceXML).jobs || { job: [] };

createValmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface ValResponse {
39 };
40
41 return fetchJSON("https://api.val.town/v1/vals", {
42 headers: {
43 Authorization: `Bearer ${token}`,

updateValByIDmain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface UpdateValArgs {
20 };
21
22 return fetchJSON(`https://api.val.town/v1/vals/${valId}`, {
23 headers: {
24 Authorization: `Bearer ${token}`,

updateValByNamemain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface UpdateValArgs {
14 };
15
16 return fetchJSON("https://api.val.town/v1/vals", {
17 headers: {
18 Authorization: `Bearer ${token}`,

spotifymain.tsx1 match

@stevekrouse•Updated 1 year ago
99});
100
101export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago