Avatar

vtdocs

Joined June 12, 2023
Public vals
70
vtdocs avatar
vtdocs
resyBot
Script
Resy bot This bot books restaurant reservations via Resy. Use it to snipe reservations at your favorite restaurant! How to use it Set up a scheduled val to call it like this: import { resyBot } from "https://esm.town/v/stevekrouse/resyBot?v=2"; import { email } from "https://esm.town/v/std/email?v=13"; export default async function (interval: Interval) { const bookingInfo = await resyBot( { slug: 'amaro-bar', city: 'ldn', day: '2023-07-05', start: '19:00', end: '21:00', partySize: 2, // Use https://www.val.town/settings/secrets for these! email: Deno.env.get("resyEmail"), password: Deno.env.get("resyPassword"), }) // If the val doesn't error, it successfully made a booking! // Send yourself an email like this: await email({ text: bookingInfo, subject: 'resy bot made a booking for you!' }) } How it works This val makes the same requests that your browser would make when you reserve a slot on Resy (that's why it needs your login info – to request an auth token). When there isn't a matching slot, this val errors and nothing else happens. When a booking is available, this val books it and returns a description of the booking so you can email it to yourself (Resy will also email you). This val will then stop attempting bookings for you until you change one of the arguments you're passing (it concats the non-sensitive arguments and uses this as a key). Credit to @rlesser and @alp for their existing Resy vals (search for resy on here).
7
vtdocs avatar
vtdocs
resyBookSlot
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Given a valid booking token, this val attempts to make a reservation for the booking token's slot. There is some retry logic as the API route (rarely) returns an internal server error.
1
vtdocs avatar
vtdocs
resyGetSlotBookingToken
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Given a valid slot, this val generates the booking token that's required to place a reservation.
0
vtdocs avatar
vtdocs
resyGetMatchingSlot
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) This val attempts to return a single valid slot (per the time range requirements). If there are no valid slots, it throws an error. When there are multiple valid slots, it picks the middle slot (by ordering, not necessarily by time).
1
vtdocs avatar
vtdocs
resyVenueIdFromSlugAndCity
Script
(Part of: https://www.val.town/v/vtdocs.resyBot)
0
vtdocs avatar
vtdocs
resyAuth
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Get a user's auth token and payment methods.
0
vtdocs avatar
vtdocs
resyPublicAPIKey
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Resy's current public API key.
0
vtdocs avatar
vtdocs
downloadTextFromS3
Script
Part of the Upload and download from AWS S3 guide on docs.val.town
1
vtdocs avatar
vtdocs
uploadTextToS3
Script
Part of the Upload and download from AWS S3 guide on docs.val.town
1
vtdocs avatar
vtdocs
slackReplyToMessage
Script
Part of the A Slack bot that replies to mentions guide on docs.val.town .
2
vtdocs avatar
vtdocs
slackWebHookMessageExample
Script
Part of the Send messages to Slack guide on https://docs.val.town
1
vtdocs avatar
vtdocs
planetScaleSelectStockTable
Script
Part of the PlanetScale page on docs.val.town .
1
vtdocs avatar
vtdocs
planetScaleInsertStockTable
RPC (deprecated)
Part of the PlanetScale page on docs.val.town .
1
vtdocs avatar
vtdocs
planetScaleCreateStockTable
Script
Part of the PlanetScale page on docs.val.town .
1
vtdocs avatar
vtdocs
planetScaleShowTablesExample
Script
An interactive, runnable TypeScript val by vtdocs
0
vtdocs avatar
vtdocs
queryPlanetScale
Script
A helper for querying PlanetScale using their SDK. Part of the PlanetScale page on docs.val.town .
1