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=765&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 8301 results for "fetch"(1361ms)

aqimain.tsx2 matches

@ychu•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let aqi = async () => {
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({

slackWebHookMessageExamplemain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
4export const slackWebHookMessageExample = (async () => {
5 const res = await fetch(process.env.slackWebhookURL, {
6 method: "POST",
7 body: JSON.stringify({

telegramGetUpdatesmain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramGetUpdates = async (botToken: string) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/getUpdates`,
6 );

generateQRmain.tsx1 match

@galligan•Updated 1 year ago
1// fetch("https://api.val.town/v1/express/galligan.generateQR?url={url}"
2// QR Code Generator
3// 1. Right click on the bookmarks bar and add new bookmark

nameNationalitymain.tsx2 matches

@rodrigotellovaltown•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

githubEventsmain.tsx2 matches

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

manchesterBerylStationsmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { manchesterBerylStationStatus } from "https://esm.town/v/neverstew/manchesterBerylStationStatus";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export let manchesterBerylStations = fetchJSON(
5 "https://gbfs.beryl.cc/v2_2/Greater_Manchester/station_information.json",
6).then((data) =>

commentsmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function comments({ token, relationship, since, until, offset, limit }: {
34 };
35}> {
36 return fetchJSON(
37 "https://api.val.town/v1/me/comments?" +
38 searchParams({

fetchJSONmain.tsx3 matches

@mridula•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchJSON = async (url: string, options?: any) => {
4 let f = await fetch(url, {
5 ...options,
6 headers: {

dailyMathFactmain.tsx2 matches

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

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago