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=fetch&page=740&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 8163 results for "fetch"(2941ms)

nytmain.tsx2 matches

@baj•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function nyt(req: express.Request, res: express.Response) {
4 const data = await fetchText(
5 "https://cn.nytimes.com/",
6 {

discordWelcomeBotMsgForwardermain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { discordSendDM } from "https://esm.town/v/vtdocs/discordSendDM";
2import process from "node:process";
3import { discordFetch } from "https://esm.town/v/vtdocs/discordFetch";
4import { discordDMs } from "https://esm.town/v/vtdocs/discordDMs";
5
10 const repliesToBot = [];
11 for (const channelId of discordDMs) {
12 const messages = await discordFetch(
13 process.env.discordBot,
14 // Note: not using pagination here

nasaAPODmain.tsx2 matches

@sokratis•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD

usermain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const user = ({ token, id }: {
10 profileImageUrl: string;
11}> =>
12 fetchJSON(`https://api.val.town/v1/users/${id}`, {
13 headers: token
14 ? {

deleteValVersionmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function deleteValVersion({ token, id, version }: {
6 version: number;
7}): Promise<Response> {
8 return fetch(`https://api.val.town/v1/vals/${id}/versions/${version}`, {
9 headers: {
10 Authorization: `Bearer ${token}`,

githubGistsmain.tsx2 matches

@kennyg•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);

getTmdbTrendingMoviesmain.tsx2 matches

@bclaudios•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getTmdbTrendingMovies = async (
14 },
15 };
16 const res = await (await fetch(url, options)).json();
17 return res.results;
18};

fetchProxymain.tsx3 matches

@ridge•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// intended for GET requests to bypass some CORS problems.
4export async function fetchProxy(url) {
5 let response = await fetch(url);
6 return response.ok ? response.text() : "";
7}

imdb_titlemain.tsx1 match

@U9G•Updated 1 year ago
5 return DOMParser;
6 // console.log(DomParser);
7 // const txt = await fetch(`https://www.imdb.com/title/${title}`, {
8 // headers: {
9 // "User-Agent":

postWebhookTest1main.tsx2 matches

@val•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let postWebhookTest1 = fetchJSON(
4 "https://api.val.town/express/@stevekrouse.postWebhook1",
5 {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago