425 if (url.pathname === "/create-checkout-session" && req.method === "POST") {
426 const stripe = new Stripe(Deno.env.get("STRIPE_SECRET_KEY"), {
427 apiVersion: "2022-11-15",
428 });
429
464
465 const stripe = new Stripe(Deno.env.get("STRIPE_SECRET_KEY"), {
466 apiVersion: "2022-11-15",
467 });
468
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans
9async function fetchRandomJoke() {
10 const response = await fetch(
11 "https://official-joke-api.appspot.com/random_joke",
12 );
13 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
4function fetchRandomJoke() {
5 const response = fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response;
8const query = "(@AliveEvidence -from:AliveEvidence) OR \"Alive Evidence\" OR \"Alive evidence\" -is:retweet";
9
10// Define the structure of a tweet based on Twitter API v2
11interface Tweet {
12 id: string;
39 const encodedQuery = encodeURIComponent(query);
40 const url =
41 `https://api.twitter.com/2/tweets/search/recent?query=${encodedQuery}&start_time=${since}&tweet.fields=author_id&expansions=author_id`;
42
43 const response = await fetch(url, {
1## API setup to vercel database
4
5This val gets Twitter data via [SocialData](https://socialdata.tools) via
6@stevekrouse/socialDataProxy. Val Town Pro users can call this API
7100 times per day, so be sure not to set this cron to run more than once every 15 min.
8If you want to use it more, get your own [SocialData](https://socialdata.tools)
9API token and pay for it directly.
10
11## 1. Query
13Change the `query` variable for what you want to get notified for.
14
15You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
16
17## 2. Notification