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=761&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 8136 results for "fetch"(3414ms)

githubGistsmain.tsx2 matches

@benigeri•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);

fetchBinancemain.tsx3 matches

@oske•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchBinance = (payType: string) =>
4 fetch("https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search", {
5 method: "POST",
6 body: JSON.stringify({

valRunsmain.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 valRuns({ token, id, error, source, since, until, offset, limit }: {
37 };
38}> {
39 return fetchJSON(
40 `https://api.val.town/v1/vals/${id}/runs?` +
41 searchParams({

sendToTelegrammain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3import { secretToTelegramChat } from "https://esm.town/v/pomdtr/secretToTelegramChat";
5export async function sendToTelegram(secret: string, message: string) {
6 const chatID = secretToTelegramChat[secret];
7 const resp = await fetch(
8 `https://api.telegram.org/bot${process.env.telegramToken}/sendMessage?chat_id=${chatID}&text=${message}`,
9 {

webhookmain.tsx2 matches

@eric•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { secretSlackWebhookEndpoint } from "https://esm.town/v/eric/secretSlackWebhookEndpoint";
3
5 const slack = secretSlackWebhookEndpoint
6 console.log("@eric.webhook", req.body)
7 await fetch(slack, {
8 method: 'POST',
9 header: {'Content-Type': 'application/json'},

markdownToHtmlmain.tsx2 matches

@jessmartin•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const markdownToHtml = async (res, req) => {
5 const unified = (await import("npm:unified")).unified;
6 const markdown = (await import("npm:remark-parse")).default;
7 const markdownToConvert = fetch(
8 "https://jessmartin-todoMarkdown.express.val.run",
9 );

register_discord_commandsmain.tsx2 matches

@malloc•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let register_discord_commands = async (
13 url += `commands`;
14 }
15 const response = await fetch(url, {
16 headers: {
17 "Content-Type": "application/json",

reachingFreeTierLimitmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3import process from "node:process";
4
14 },
15 };
16 const me = await fetchJSON(
17 "https://api.val.town/v1/me",
18 opts,

createGeneratedValmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2import { runVal } from "https://esm.town/v/std/runVal";
3
10 description,
11 );
12 const val = await fetchJSON(
13 `https://api.val.town/v1/vals`,
14 {

postWebhookTest4main.tsx2 matches

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

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago