1// import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2import process from "node:process";
3
4export const browserlessScrapeExample = (async () => {
5 try {
6 const res = await fetch(
7 `https://chrome.browserless.io/scrape?token=${process.env.browserlessKey}`,
8 {
9app.post("/test", (c) => c.text("Hello Lagon test ppost!"));
10
11export const handler = app.fetch;
12
13// export const honoExample = async (req: Request) => {
16// app.get("/", (c) => c.text("Hono?"));
17// app.get("/yeah", (c) => c.text("Routing!"));
18// return app.fetch(req);
19// };
1Function that fetches app data from the playstore through bundleId
2
3Migrated from folder: Edoo/getDetailsPlaystore
1import { following } from "https://esm.town/v/darcy/following";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export function feed() {
5 let _feed = following.map(async (name) => {
6 let req = await fetch(`https://api.val.town/v1/run/${name}.posts`);
7 let res = (req.status === 200) ? req.json() : {};
8 return res;
1import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";
2
3export const fetchText = async (url: string, options?: any) => {
4 let f = await fetch(normalizeURL(url), {
5 redirect: "follow",
6 ...(options || {}),
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const glifJson = async (req: Reqeust) => {
6 const url = `https://glif.app/api/glifs?id=${id}`;
7 try {
8 const response = await fetch(url);
9 if (!response.ok) {
10 throw new Error(`HTTP error! status: ${response.status}`);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const glifs = async (id: string) => {
4 const url = `https://glif.app/api/glifs?featured=1`;
5 try {
6 const response = await fetch(url);
7 if (!response.ok) {
8 throw new Error(`HTTP error! status: ${response.status}`);
1import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function refreshTwitterToken(
15 client_id,
16 });
17 return fetchJSON(url, {
18 method: "POST",
19 headers: {
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export const shitIsMySiteDown = async () => {
12 let status = "up";
13 try {
14 const response = await fetch(URL);
15 if (response.status !== 200) {
16 throw new Error(`status code: ${response.status}`);
1import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function twitterRequestAccessToken(
18 redirect_uri,
19 });
20 return fetchJSON(url, {
21 method: "POST",
22 headers: {