Giter Site home page Giter Site logo

resy-api's Introduction

Resy-API

This is an attempt at creating a javascript client for Resy. The code from Resy's homepage is in the src/minifiedSourceCode - it's more feature full and has more routes than my client, but is a bit harder to read because it's been minified.

The src/controllers has the cleaner code that's meant for more programmatic use.

Usage

You must first set up your environment variables. These need to be

RESY_EMAIL
RESY_PASSWORD

Optionally, if you'd like text message notifications, you can also set the following twilio variables.

TO_NUMBER
TWILIO_AUTH
TWILIO_NUMBER
TWILIO_SID

Data storage

Resy API uses lowdb, a small JSON db, to store its information. You can either call it programatically or you can create a file called db.json in the same directory as this README with the following template:

{
  "venues": [
    {
      "name": "Cote",
      "id": 35676,
      "notified": false,
      "minTime": "17:00",
      "preferredTime": "19:30",
      "maxTime": "22:00",
      "shouldBook": true,
      "partySize": 2,
      "allowedDates": ["2022-06-07", "2022-06-08"]
    }
  ]
}

You can find the ID of the venue by searching for it on Resy in Chrome and finding one of the network requests with venue_id as the URL param and using that, or by searching for it programatically using the ResyService search function.

Monitoring

You can run yarn monitor to run the monitoring. This will check every 5 minutes.

ToDo

It would be nice to add a UI on top of this, or maybe even make it a service so non-technical people could use it.

resy-api's People

Contributors

bootleg224 avatar jonluca avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.