1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
3export const fetchPelotonWorkouts = async (user_id, session_id) => {
4 const workouts = await fetch(
5 `https://api.onepeloton.com/api/user/${user_id}/workouts?=peloton.ride&limit=50&page=0&sort_by=-created`,
6 {
7 method: "get",
12 };
13 const hdrs = {
14 "Accept": "application/json;api-version=3.0-preview.1",
15 "Content-Type": "application/json",
16 };
17 const response = await fetch(
18 "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery",
19 {
20 body: JSON.stringify(body),
14 var parser = new DOMParser();
15 let title = "Linus's stream";
16 let link = "https://api3.val.town/express/@coofdy.streamThesaphistRSS";
17 let base = "https://stream.thesephist.com";
18 var rss = [
3export let fetchABird = async () => {
4 const MAX_ID = 777905;
5 const baseUrl = "https://xeno-canto.org/api/2/recordings";
6 const minAnimalId = Math.floor(Math.random() * (MAX_ID + 10));
7 const query = `?query=nr:${minAnimalId}-${minAnimalId + 10}`;
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}