1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const user = ({ token, id }: {
10 profileImageUrl: string;
11}> =>
12 fetchJSON(`https://api.val.town/v1/users/${id}`, {
13 headers: token
14 ? {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function deleteValVersion({ token, id, version }: {
6 version: number;
7}): Promise<Response> {
8 return fetch(`https://api.val.town/v1/vals/${id}/versions/${version}`, {
9 headers: {
10 Authorization: `Bearer ${token}`,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getTmdbTrendingMovies = async (
14 },
15 };
16 const res = await (await fetch(url, options)).json();
17 return res.results;
18};
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// intended for GET requests to bypass some CORS problems.
4export async function fetchProxy(url) {
5 let response = await fetch(url);
6 return response.ok ? response.text() : "";
7}
5 return DOMParser;
6 // console.log(DomParser);
7 // const txt = await fetch(`https://www.imdb.com/title/${title}`, {
8 // headers: {
9 // "User-Agent":
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let postWebhookTest1 = fetchJSON(
4 "https://api.val.town/express/@stevekrouse.postWebhook1",
5 {
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
13 };
14
15 let response = await fetch(URL, {
16 method: "POST",
17 headers: {
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