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?q=fetch&page=777&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 8325 results for "fetch"(3895ms)

mathFactmain.tsx2 matches

@potherca•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

fetchValTownAPImain.tsx3 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function fetchValTownAPI(
4 apiToken: string,
5 path: string,
12 path = "/v1" + path;
13 }
14 return fetchJSON(`https://api.val.town${path}`, {
15 ...options,
16 headers: {

elevenlabsTTSmain.tsx2 matches

@ale_annini•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
14 };
15 const voiceId = "21m00Tcm4TlvDq8ikWAM"; // https://api.elevenlabs.io/v1/voices
16 const audio = await fetch(
17 `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
18 {

dighimapperMultipleMapsmain.tsx2 matches

@bert•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const dighimapperMultipleMaps = (async () => {
4 const url =
5 "https://annotations.allmaps.org/maps?imageservicedomain=images.dighimapper.eu";
6 const reponse = await fetch(url);
7 const annotations = await reponse.json();
8 let imageIds = new Set();

getMunichSwimCapacitmain.tsx7 matches

@fgeierst•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getMunichSwimCapacit() {
21 { id: 30200, name: "Dantebad Sauna" },
22 ];
23 async function fetchCount(id) {
24 const endpoint =
25 `https://functions.api.ticos-systems.cloud/api/gates/counter?organizationUnitIds=${id}`;
26 const response = await fetch(endpoint, {
27 headers: {
28 "abp-tenantid": "69",
34 "sec-ch-ua-mobile": "?0",
35 "sec-ch-ua-platform": '"macOS"',
36 "sec-fetch-dest": "empty",
37 "sec-fetch-mode": "cors",
38 "sec-fetch-site": "cross-site",
39 },
40 referrer: "https://www.swm.de/",
51 async function populateUnits() {
52 for (let unit of organizationUnitIds) {
53 const populatedUnit = await fetchCount(unit.id);
54 unit.personCount = populatedUnit.personCount;
55 unit.maxPersonCount = populatedUnit.maxPersonCount;

loginmain.tsx2 matches

@mangadex•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_BASE_URL } from "https://esm.town/v/mangadex/API_BASE_URL";
3
27 password: string,
28): Promise<LoginResponse> => {
29 const response = await fetch(
30 `${API_BASE_URL}/auth/login`,
31 {

listFeedmain.tsx2 matches

@mangadex•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_BASE_URL } from "https://esm.town/v/mangadex/API_BASE_URL";
3
26 return "The provided login credentials are incorrect.";
27 }
28 const response = await fetch(
29 `${API_BASE_URL}/list/${listId}/feed`,
30 {

callIftttMakerWebhookmain.tsx2 matches

@xkonti•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const callIftttMakerWebhook = async (event: string, key: string) => {
4 await fetch(`https://maker.ifttt.com/trigger/${event}/json/with/key/${key}`);
5};

sendNtfymain.tsx2 matches

@spuckydaslama•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const sendNtfy = async (topic: string, data: {
7 isMarkdown: boolean;
8}) => {
9 const response = await fetch(`https://ntfy.sh/${topic}`, {
10 method: "POST",
11 body: data.body,

updateTicketCoordinatormain.tsx3 matches

@ytf•Updated 1 year ago
26 // InitializeSlack API client
27 const client = new WebClient(slackAccessToken, { logLevel: LogLevel.WARN });
28 // Fetch all users
29 const result = await client.users.list({ team_id: teamId });
30 let users = result.members;
35 );
36 console.log(`Found ${users.length} users in team ${teamId}`);
37 // Fetch extended user profiles with custom fields and filter only coordinators
38 const profiles = await Promise.all(users.map(async (user) => {
39 const result = await client.users.profile.get({ user: user.id });
45 };
46 }));
47 console.log(`Fetched ${profiles.length} profiles in team ${teamId}`);
48 const ticketsCoordinators = profiles.filter((profile) =>
49 profile.ticketsCoordinator

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago