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/?q=fetch&page=762&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 7895 results for "fetch"(1652ms)

testAndroidBingAppsmain.tsx2 matches

@xuangong•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { ruleAndroidAppsCheck } from "https://esm.town/v/xuangong/ruleAndroidAppsCheck";
3
7 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
8 try {
9 const response = await fetch(url, {
10 method: "GET",
11 });

pushovermain.tsx2 matches

@meatcar•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Send a pushover message.
4// token, user, and other opts are as specified at https://pushover.net/api
5export async function pushover({ token, user, message, title, url, ...opts }) {
6 return await fetch("https://api.pushover.net/1/messages.json", {
7 method: "POST",
8 body: JSON.stringify({

githubReposmain.tsx2 matches

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

getSeattleSubwayTweetsmain.tsx2 matches

@steven•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let getSeattleSubwayTweets = async (request: Request): Promise<Response> => {
4 let data = await fetch(
5 `https://api.apify.com/v2/acts/quacker~twitter-url-scraper/runs/last/dataset/items?token=apify_api_wi6mnWH8aJ5yiwv3ePmYV7BI31yTE13ameye`,
6 );

qq_svgmain.tsx3 matches

@envl•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { calc_qq_string } from "https://esm.town/v/envl/calc_qq_string";
3
17 // stars for user
18 if (!repo) {
19 stars = await fetch(`https://api.github.com/users/${user}/repos`)
20 .then((r) => r.json())
21 .then((d) =>
25 // stars for repo
26 else {
27 const res = await fetch(
28 `https://api.github.com/search/repositories?q=${user}/${repo}`,
29 );

getTopicsmain.tsx2 matches

@nic•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const getTopics = async () => {
4 const topics = fetchJSON(
5 "https://bldgforum.com/?index=&_data=routes%2F__home%2Findex"
6 );

fetchRssmain.tsx4 matches

@pdebie•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// This supports more RSS types than @stevekrouse.fetchRSS
4export async function fetchRss(url: string, lastRunDate?: string | number) {
5 let Parser = await import("npm:rss-parser");
6 let parser = new Parser.default();
7 let response = await fetch(url);
8 let data = await response.text();
9 let { items } = await parser.parseString(data);

proxyFetch4main.tsx5 matches

@alp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const proxyFetch4 = async (req, res) => {
4 const { url, options } = req.body;
5 try {
6 const response = await fetch(url, options);
7 return res.status(response.status).send(await response.text());
8 } catch (e) {
9 const errorMessage = e instanceof Error ? e.message : "Unknown error";
10 console.error("Failed to initiate fetch", e);
11 return res.status(500).send(`Failed to initiate fetch: ${errorMessage}`);
12 }
13};

bebopBotWebhookmain.tsx2 matches

@z233•Updated 1 year ago
1import { feishuGetInteractiveMessage } from "https://esm.town/v/z233/feishuGetInteractiveMessage";
2import { bebopBotFeishuWebhookUrl } from "https://esm.town/v/z233/bebopBotFeishuWebhookUrl";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
4import { createFeishuCardActionElementBuilder } from "https://esm.town/v/z233/createFeishuCardActionElementBuilder";
5import { createFeishuCardBuilder } from "https://esm.town/v/z233/createFeishuCardBuilder";
77 }
78 const card = cardBuilder.build();
79 await fetchJSON(
80 bebopBotFeishuWebhookUrl,
81 {

peelSessionArtistSessionmain.tsx2 matches

@aeaton•Updated 1 year ago
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtistSession(url) {
4 const dom = await fetchHtmlDom(url);
5 const headings = dom.querySelectorAll("h3");
6 const trackItems = [...headings].find((heading) =>

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago