1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchIPFSPosts } from "https://esm.town/v/stevedylandev/fetchIpfsPosts";
3//import { fetchPinataPosts } from "https://esm.town/v/stevedylandev/fetchPinatsPosts";
4
5//const emailBody1 = await fetchPinataPosts();
6const emailBody2 = await fetchIPFSPosts();
7
8export let emailExample = email({
1// original val name: vicariousLavenderDeer
2import { fetch as proxied_fetch } from "https://esm.town/v/std/fetch";
3import ipaddr from "npm:ipaddr.js";
4import dns from "node:dns/promises";
17 const nets_url = (iptala_kind == "ipv4") ? ipv4_nets_url :
18 ((iptala_kind == "ipv6") ? ipv6_nets_url : "");
19 const nets_CIDR_response = await proxied_fetch(nets_url);
20 const nets_CIDR = await nets_CIDR_response.text();
21 return nets_CIDR.split("\n").reduce((acc, item, idx) =>
1import { lastRun } from "https://esm.town/v/logan/lastRun";
2import { fetch } from "https://esm.town/v/std/fetch";
3import { set } from "https://esm.town/v/std/set?v=11";
4import process from "node:process";
14 throw new Error("Must define WEATHER_BIT_API_KEY in secrets");
15 }
16 const res = await fetch(
17 `https://api.weatherbit.io/v2.0/current/airquality?lat=${lat}&lon=${long}&key=${apiKey}`,
18 );
2
3todo:
4- fetch and persist data on regular basis
5- display data from cache
6
25There are two endpoints:
26
27- `/` -- the root endpoint fetches all flags for the given user.
28- `/:id` -- fetches just one flag value, given by `:id`, for the given user.
29
30## Specifying users
112});
113
114export default app.fetch;
1# Framer Fetch: Basic
2
3A basic example of an API endpoint to use with Framer Fetch.
4
5 try {
6 // Fetch the data from the Google Script URL
7 const response = await fetch(url);
8 const jsonData = await response.json();
9
30 });
31 } catch (error) {
32 return new Response("Failed to fetch data", { status: 500 });
33 }
34}
4
5 try {
6 // Fetch the data from the Google Script URL
7 const response = await fetch(url);
8 const jsonData = await response.json();
9
38 });
39 } catch (error) {
40 return new Response("Failed to fetch data", { status: 500 });
41 }
42}
555 module: mod,
556 bytes: buffer,
557 } = (url = fetch(url), void 0, await QN(await url, mod)),
558 assignWasm(url),
559 buffer);
610const getMeta = async (url: string) => {
611 console.log(url);
612 let resp = await fetch(url, {
613 "headers": {
614 "UserAgent": user_agent,
629 let getSourcesUrl = "https://rabbitstream.net/ajax/v2/embed-4/getSources?id=" + xrax + "&v="
630 + fake_window.localStorage.kversion + "&h=" + fake_window.localStorage.kid + "&b=1676800512";
631 let resp_json = await (await fetch(getSourcesUrl, {
632 "headers": {
633 "User-Agent": user_agent,