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=659&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 7903 results for "fetch"(812ms)

greenhouseToRSSmain.tsx2 matches

@donmccurdy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function greenhouseToRSS(req: Request) {
7 const mode = searchParams.get("mode");
8 const SOURCE_URL = `https://boards-api.greenhouse.io/v1/boards/${account}/jobs`;
9 const { jobs: sourceJobs } = await fetch(SOURCE_URL).then((res) => res.json());
10
11 const getFeedLink = (mode) => `https://donmccurdy-greenhousetorss.express.val.run/?account=${account}&mode=${mode}`;

leverToRSSmain.tsx2 matches

@donmccurdy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function leverToRSS(req: Request) {
9 const SOURCE_URL = `https://api.lever.co/v0/postings/${account}?mode=xml`;
10 const parser = new XMLParser();
11 const sourceXML = await fetch(SOURCE_URL).then((res) => res.text());
12
13 const { job: sourceJobs } = parser.parse(sourceXML).jobs || { job: [] };

createValmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface ValResponse {
39 };
40
41 return fetchJSON("https://api.val.town/v1/vals", {
42 headers: {
43 Authorization: `Bearer ${token}`,

updateValByIDmain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface UpdateValArgs {
20 };
21
22 return fetchJSON(`https://api.val.town/v1/vals/${valId}`, {
23 headers: {
24 Authorization: `Bearer ${token}`,

updateValByNamemain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface UpdateValArgs {
14 };
15
16 return fetchJSON("https://api.val.town/v1/vals", {
17 headers: {
18 Authorization: `Bearer ${token}`,

spotifymain.tsx1 match

@stevekrouse•Updated 1 year ago
99});
100
101export default app.fetch;

spotifyRefreshTokenmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import { querystring } from "https://esm.town/v/stevekrouse/querystring";
3
4export let spotifyRefreshToken = async ({ refresh_token, client_id, client_secret }) =>
5 fetchJSON("https://accounts.spotify.com/api/token", {
6 method: "POST",
7 body: await querystring({

constructReadTangleUrlmain.tsx1 match

@willthereader•Updated 1 year ago
2
3// Immediately invoked function that exports a function generating a URL as a string,
4// which fetches all comments from an article associated with the provided post_id.
5export const constructReadTangleUrl = (() => {
6 return (post_id) => {

getThreadsActivitymain.tsx1 match

@stevekrouse•Updated 1 year ago
20
21async function getNewThreads() {
22 const resp = await fetch(`https://discord.com/api/guilds/${guild}/threads/active`, {
23 headers: {
24 "Authorization": `Bot ${token}`,

htmx_hono_layoutmain.tsx1 match

@saolsen•Updated 1 year ago
119});
120
121export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago