2
3const browser = await puppeteer.connect({
4 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
5});
6
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3import { sleep } from "https://esm.town/v/vtdocs/sleep";
4
18 while (true) {
19 try {
20 const bookRes = await fetch(`https://api.resy.com/3/book`, {
21 method: "POST",
22 headers: {
23 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,
24 "x-resy-auth-token": token,
25 "content-type": "application/x-www-form-urlencoded",
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyGetSlotBookingToken = async (
16 };
17 const detailsRes = await fetch(
18 `https://api.resy.com/3/details?${new URLSearchParams(detailsParams)}`,
19 {
20 "headers": {
21 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,
22 "x-resy-auth-token": token,
23 "User-Agent":
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyGetMatchingSlot = async (
23 const endTime = new Date(`${day} ${end}`);
24 const slotsRes = await fetch(
25 `https://api.resy.com/4/find?lat=0&long=0&day=${day}&party_size=${partySize}&venue_id=${venueId}`,
26 {
27 "headers": {
28 "authorization":
29 `ResyAPI api_key="${resyPublicAPIKey}"`,
30 "x-resy-auth-token": token,
31 "User-Agent":
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
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 />
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyGetMatchingSlot = async (
23 const endTime = new Date(`${day} ${end}`);
24 const slotsRes = await fetch(
25 `https://api.resy.com/4/find?lat=0&long=0&day=${day}&party_size=${partySize}&venue_id=${venueId}`,
26 {
27 "headers": {
28 "authorization":
29 `ResyAPI api_key="${resyPublicAPIKey}"`,
30 "x-resy-auth-token": token,
31 },
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyAuth = async (email: string, password: string): Promise<{
9 }[];
10}> => {
11 const authRes = await fetch("https://api.resy.com/3/auth/password", {
12 "headers": {
13 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,
14 "content-type": "application/x-www-form-urlencoded",
15 "User-Agent":
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyAuth = async (email: string, password: string): Promise<{
9 }[];
10}> => {
11 const authRes = await fetch("https://api.resy.com/3/auth/password", {
12 "headers": {
13 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,
14 "content-type": "application/x-www-form-urlencoded",
15 "User-Agent":
9```ts
10const resyBotCron = async () => {
11 const bookingInfo = await api(@vtdocs.resyBot, {
12 slug: 'amaro-bar',
13 city: 'ldn',