1import { fetchJSON } from "https://esm.town/v/ian/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json ");
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export async function gitlabUserContributionEvents(afterDateMs) {
6 console.log(after);
7 // https://docs.gitlab.com/ee/api/events.html#get-user-contribution-events
8 let userEvents = await fetchJSON(
9 `gitlab.com/api/v4/users/rwev/events?after=${after}`,
10 {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function duckAndWaffle() {
8 let party_size = "2";
9
10 let response = await fetch(
11 `https://www.sevenrooms.com/api-yoa/availability/widget/range?venue=${venue}&time_slot=${time_slot}&party_size=${party_size}&halo_size_interval=5&start_date=${start_date}&num_days=1&channel=SEVENROOMS_WIDGET`
12 );
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/bramses/events"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let get = () => {
4 var res = fetch("https://tampere.sometec.fi/showSpace03S.php", {
5 credentials: "include",
6 headers: {
11 "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
12 "X-Requested-With": "XMLHttpRequest",
13 "Sec-Fetch-Dest": "empty",
14 "Sec-Fetch-Mode": "cors",
15 "Sec-Fetch-Site": "same-origin",
16 },
17 referrer: "https://tampere.sometec.fi/index.html?sP409100P600P",
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function getAppleDevice(req: express.Request, res: express.Response) {
4 const deviceId = req.query.search_keywords as string;
5 const html = await fetchText(
6 `https://everymac.com/ultimate-mac-lookup/?search_keywords=${
7 encodeURI(deviceId)
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let npmExample = (async () => {
4 const ip = await import("npm:image-pixels"); // The Lodash library exported as ES modules.
5 const image = await fetch(
6 "https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png"
7 ).then((r) => console.log(r));
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let aqi = async () => {
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export const editVal = (body: {
7 isInterval?: boolean;
8}) =>
9 fetchJSON(`api.val.town/run/`, {
10 headers: {
11 accept: "*/*",
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);