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/image-url.jpg?q=fetch&page=771&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 8384 results for "fetch"(1075ms)

openAiModerationmain.tsx2 matches

@patrickjm•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3/**
23 body.model = model;
24 }
25 const result = await fetchJSON(
26 "https://api.openai.com/v1/moderations",
27 {

nasaAPODmain.tsx2 matches

@cufaoil•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD

fetchJSONmain.tsx3 matches

@U9G•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchJSON = async (url: string, options?: any) => {
4 let f = await fetch(url, {
5 ...options,
6 headers: {

searchTweetsmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function searchTweets({ accessToken, query, params }: {
7}) {
8 const q = new URLSearchParams({ query, ...params }).toString();
9 const results = await fetchJSON(
10 `https://api.twitter.com/2/tweets/search/recent?${q}`,
11 {

getPoemForTimemain.tsx2 matches

@crsven•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let getPoemForTime = async (time: string) => {
4 const poemResponse = await fetch(
5 `https://poem.town/api/v1/clock/poem/${time}`
6 );

postToMastodonmain.tsx2 matches

@sebdd•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function postToMastodon(mastodonApiUrl, mastodonAccessToken, status) {
4 return fetch(
5 `${mastodonApiUrl}/statuses?access_token=${mastodonAccessToken}`,
6 {

kaiterra_prometheusmain.tsx3 matches

@tehmantra•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Fetches air quality sensor data from Kaiterra in prometheus line format
4export async function kaiterra_prometheus(
5 req: express.Request,
7) {
8 let id = req.query.id;
9 let kiosk_res = await fetch(
10 `https://dashboard.kaiterra.com/v1/account/me/kiosk/data/v2/${id}`,
11 );

postWebhookTestmain.tsx2 matches

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

usgsSitemain.tsx2 matches

@eczajk•Updated 1 year ago
1import { fetchXML } from "https://esm.town/v/stevekrouse/fetchXML?v=3";
2
3export async function usgsSite(site) {
4 const result = await fetchXML(
5 `http://waterservices.usgs.gov/nwis/iv/?site=${site}`
6 );

createQdrantCollectionmain.tsx2 matches

@wilt•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3/**
11}) {
12 const { collectionName, qdrantKey, qdrantUrl } = args;
13 const resp = await fetch(
14 `https://${qdrantUrl}/collections/${collectionName}`,
15 {

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago