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=647&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 7883 results for "fetch"(851ms)

honoExamplemain.tsx1 match

@bis•Updated 1 year ago
12}
13
14export default app.fetch;

metamain.tsx2 matches

@postpostscript•Updated 1 year ago
11 const name = getValNameFromUrl(url).slice(1);
12
13 const res = await fetch(`https://api.val.town/v1/alias/${name}`, {
14 headers: {
15 authorization: `Bearer ${Deno.env.get("valtown")}`,
39 }
40
41 return fetch(url).then((res) => res.text()).then(text => {
42 moduleSourceCache.set(url, text);
43 return text;

search_liked_valsmain.tsx1 match

@pomdtr•Updated 1 year ago
4export default async function(ctx: BrowserContext<{ user: string }>) {
5 const { user: userID } = ctx.params;
6 const resp = await fetch(`https://api.val.town/v1/me/likes?limit=100`, {
7 headers: {
8 Authorization: `Bearer ${Deno.env.get("valtown")}`,

recommendsmain.tsx1 match

@postpostscript•Updated 1 year ago
2
3export async function randomLike() {
4 const { data } = await fetch("https://api.val.town/v1/me/likes", {
5 headers: {
6 Authorization: `Bearer ${Deno.env.get("valtown")}`,

vuemain.tsx1 match

@postpostscript•Updated 1 year ago
29 };
30 }
31 const res = await fetch(url);
32 if (!res.ok)
33 throw Object.assign(new Error(res.statusText + " " + url), { res });

fetchBlueskyPostmain.tsx1 match

@vladimyr•Updated 1 year ago
3import ky from "npm:ky";
4
5export async function fetchPost(url: string | URL) {
6 const postURL = new URL(url);
7 if (postURL.hostname !== "bsky.app") {

emptyValUtilsmain.tsx3 matches

@nbbaier•Updated 1 year ago
1import { fetchPaginatedData } from "https://esm.town/v/nbbaier/fetchPaginatedData";
2import { deleteVal } from "https://esm.town/v/neverstew/deleteVal";
3
4export async function listEmptyVals(id: string) {
5 const token = Deno.env.get("valtown");
6 const res = await fetchPaginatedData(`https://api.val.town/v1/users/${id}/vals`, {
7 headers: { Authorization: `Bearer ${token}` },
8 });
12export async function deleteEmptyVals(id: string) {
13 const token = Deno.env.get("valtown");
14 const res = await fetchPaginatedData(`https://api.val.town/v1/users/${id}/vals`, {
15 headers: { Authorization: `Bearer ${token}` },
16 });

vtIdeaAggregatormain.tsx1 match

@nbbaier•Updated 1 year ago
82});
83
84export const blog = app.fetch;

activityPubAgentREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: signed_fetch/activityPubAgent

signedFetchREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: signed_fetch/signedFetch

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago