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=773&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 8186 results for "fetch"(2341ms)

ipmain.tsx2 matches

@ian•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/ian/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json ");

gitlabUserContributionEventsmain.tsx2 matches

@rwev•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export async function gitlabUserContributionEvents(afterDateMs) {
6 console.log(after);
7 // https://docs.gitlab.com/ee/api/events.html#get-user-contribution-events
8 let userEvents = await fetchJSON(
9 `gitlab.com/api/v4/users/rwev/events?after=${after}`,
10 {

duckAndWafflemain.tsx2 matches

@dot•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function duckAndWaffle() {
8 let party_size = "2";
9
10 let response = await fetch(
11 `https://www.sevenrooms.com/api-yoa/availability/widget/range?venue=${venue}&time_slot=${time_slot}&party_size=${party_size}&halo_size_interval=5&start_date=${start_date}&num_days=1&channel=SEVENROOMS_WIDGET`
12 );

githubEventsmain.tsx2 matches

@bram•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/bramses/events"
6);

getmain.tsx5 matches

@pncumhsk•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let get = () => {
4 var res = fetch("https://tampere.sometec.fi/showSpace03S.php", {
5 credentials: "include",
6 headers: {
11 "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
12 "X-Requested-With": "XMLHttpRequest",
13 "Sec-Fetch-Dest": "empty",
14 "Sec-Fetch-Mode": "cors",
15 "Sec-Fetch-Site": "same-origin",
16 },
17 referrer: "https://tampere.sometec.fi/index.html?sP409100P600P",

getAppleDevicemain.tsx2 matches

@zebrainy•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function getAppleDevice(req: express.Request, res: express.Response) {
4 const deviceId = req.query.search_keywords as string;
5 const html = await fetchText(
6 `https://everymac.com/ultimate-mac-lookup/?search_keywords=${
7 encodeURI(deviceId)

npmExamplemain.tsx2 matches

@phelan•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let npmExample = (async () => {
4 const ip = await import("npm:image-pixels"); // The Lodash library exported as ES modules.
5 const image = await fetch(
6 "https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png"
7 ).then((r) => console.log(r));

aqimain.tsx2 matches

@herku•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({

editValmain.tsx2 matches

@vez•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export const editVal = (body: {
7 isInterval?: boolean;
8}) =>
9 fetchJSON(`api.val.town/run/`, {
10 headers: {
11 accept: "*/*",

boredActivitiesmain.tsx2 matches

@hetzelhouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago