1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://charmaine--5ad9e364-05c3-11f0-a042-569c3dd06744.web.val.run/"), {
4 method: req.method,
5 headers: req.headers,
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const discordWebhook = async ({
8 content: string;
9}) => {
10 const res = await fetch(url, {
11 method: "POST",
12 redirect: "follow",
19 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
20
21 // Fetch and log tweets
22 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23 console.log("Response from socialDataSearch:", response);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4 const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5 url.searchParams.set("query", query);
6 return await fetchJSON(url.toString(), {
7 bearer: Deno.env.get("valtown"),
8 });
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const discordWebhook = async ({
8 content: string;
9}) => {
10 const res = await fetch(url, {
11 method: "POST",
12 redirect: "follow",
19 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
20
21 // Fetch and log tweets
22 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23 console.log("Response from socialDataSearch:", response);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4 const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5 url.searchParams.set("query", query);
6 return await fetchJSON(url.toString(), {
7 bearer: Deno.env.get("valtown"),
8 });
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://vtwn_36ywGmYjcDL4HJKfTSmGbJKVWNny--charmaine.web.val.run/"), {
4 method: req.method,
5 headers: req.headers,
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://vtwn_36ywGmYjcDL4HJKfTSmGbJKVWNny--charmaine.web.val.run/"), {
4 method: req.method,
5 headers: req.headers,
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 return fetch(new URL(url.pathname + url.search, "https://vtwn_36ywGmYjcDL4HJKfTSmGbJKVWNny--charmaine.web.val.run/"), {
4 method: req.method,
5 headers: req.headers,