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=410&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 5857 results for "fetch"(604ms)

megacloudUtilsmain.tsx2 matches

@temptemp•Updated 7 months ago
39}
40export async function getMeta(id) {
41 const req = await fetch(`https://rabbitstream.net/v2/embed-4/${id}?z=`, {
42 headers: {
43 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0",
55}
56export async function getWasm() {
57 const req = await fetch("https://rabbitstream.net/images/loading.png?v=0.6", {
58 "headers": {
59 "Referrer-Policy": "strict-origin-when-cross-origin",

githubreposearchmain.tsx3 matches

@toowired•Updated 7 months ago
1export default async function fetchNewPublicGitHubRepos() {
2 // Generate today's date in YYYY-MM-DD format
3 const today = new Date().toISOString().split("T")[0];
9 const url = `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=${sort}&order=${order}`;
10
11 const response = await fetch(url, {
12 headers: {
13 "Accept": "application/vnd.github.v3+json",
14 "User-Agent": "Deno-GitHub-Repo-Fetcher", // GitHub API requires a user-agent header
15 },
16 });

gptMemoryManagerREADME.md1 match

@toowired•Updated 7 months ago
71# Long-term memory
72
73At some point the user might ask you to do something with "memory". Things like "remember", "save to memory", "forget", "update memory", etc. Please use corresponding actions to achieve those tasks. User might also ask you to perform some task with the context of your "memory" - in that case fetch all memories before proceeding with the task. The memories should be formed in a clear and purely informative language, void of unnecessary adjectives or decorative language forms. An exception to that rule might be a case when the language itself is the integral part of information (snippet of writing to remember for later, examples of some specific language forms, quotes, etc.).
74
75Structure of a memory:

gptMemoryManagermain.tsx1 match

@toowired•Updated 7 months ago
458 });
459
460 return app.fetch(req);
461};

gpt_memoryREADME.md1 match

@toowired•Updated 7 months ago
71# Long-term memory
72
73At some point the user might ask you to do something with "memory". Things like "remember", "save to memory", "forget", "update memory", etc. Please use corresponding actions to achieve those tasks. User might also ask you to perform some task with the context of your "memory" - in that case fetch all memories before proceeding with the task. The memories should be formed in a clear and purely informative language, void of unnecessary adjectives or decorative language forms. An exception to that rule might be a case when the language itself is the integral part of information (snippet of writing to remember for later, examples of some specific language forms, quotes, etc.).
74
75Structure of a memory:

gptMemoryManagerREADME.md1 match

@amoz1•Updated 7 months ago
71# Long-term memory
72
73At some point the user might ask you to do something with "memory". Things like "remember", "save to memory", "forget", "update memory", etc. Please use corresponding actions to achieve those tasks. User might also ask you to perform some task with the context of your "memory" - in that case fetch all memories before proceeding with the task. The memories should be formed in a clear and purely informative language, void of unnecessary adjectives or decorative language forms. An exception to that rule might be a case when the language itself is the integral part of information (snippet of writing to remember for later, examples of some specific language forms, quotes, etc.).
74
75Structure of a memory:

gptMemoryManagermain.tsx1 match

@amoz1•Updated 7 months ago
458 });
459
460 return app.fetch(req);
461};

lightGrayCrowmain.tsx8 matches

@jeffreyyoung•Updated 7 months ago
3import { email } from "https://esm.town/v/std/email";
4
5async function fetchStories(type: string, count: number) {
6 const response = await fetch(`https://hacker-news.firebaseio.com/v0/${type}stories.json`);
7 const storyIds = await response.json();
8 const stories = await Promise.all(
9 storyIds.slice(0, count).map(async (id: number) => {
10 const storyResponse = await fetch(`https://hacker-news.firebaseio.com/v0/item/${id}.json`);
11 return storyResponse.json();
12 }),
120export default async function server(req: Request) {
121 try {
122 const topStories = await fetchStories("top", 10);
123 const newStories = await fetchStories("new", 5);
124 const showStories = await fetchStories("show", 3);
125 const askStories = await fetchStories("ask", 3);
126 const jobStories = await fetchStories("job", 3);
127
128 const emailContent = createEmailContent(topStories, newStories, showStories, askStories, jobStories);

hackerNewsDigestmain.tsx8 matches

@jeffreyyoung•Updated 7 months ago
3import { email } from "https://esm.town/v/std/email";
4
5async function fetchStories(type: string, count: number) {
6 const response = await fetch(`https://hacker-news.firebaseio.com/v0/${type}stories.json`);
7 const storyIds = await response.json();
8 const stories = await Promise.all(
9 storyIds.slice(0, count).map(async (id: number) => {
10 const storyResponse = await fetch(`https://hacker-news.firebaseio.com/v0/item/${id}.json`);
11 return storyResponse.json();
12 }),
120export default async function server(req: Request) {
121 try {
122 const topStories = await fetchStories("top", 10);
123 const newStories = await fetchStories("new", 5);
124 const showStories = await fetchStories("show", 3);
125 const askStories = await fetchStories("ask", 3);
126 const jobStories = await fetchStories("job", 3);
127
128 const emailContent = createEmailContent(topStories, newStories, showStories, askStories, jobStories);

bookReservationOnResymain.tsx7 matches

@ireneg•Updated 7 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const bookReservationOnResy = async ({
145 )
146 }&password=${encodeURIComponent(params.password)}`;
147 const response = await fetch(`${RESY_API_URL}/3/auth/password`, {
148 method: "POST",
149 body: body,
167 }) => {
168 const url = `${RESY_API_URL}/3/details`;
169 const response = await fetch(url.toString(), {
170 method: "POST",
171 headers: RESY_DEFAULT_HEADERS,
192 searchParams.set("party_size", params.seats.toString());
193 searchParams.set("venue_id", params.venueId);
194 const response = await fetch(`${url}?${searchParams}`, {
195 method: "GET",
196 headers: RESY_DEFAULT_HEADERS,
212 searchParams.set("url_slug", params.slug);
213 searchParams.set("location", params.city);
214 const response = await fetch(`${url}?${searchParams}`, {
215 method: "GET",
216 headers: RESY_DEFAULT_HEADERS,
224 authToken: string;
225 }) => {
226 const response = await fetch(`${RESY_API_URL}/3/book`, {
227 method: "POST",
228 headers: {
252 venueId,
253 });
254 console.log("Fetched available slots for day", {
255 count: slots.length,
256 times: slots.map((slot) => `${slot.date.start} -> ${slot.date.end}`),

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago