https://github.com/euforic/opentable
Basic Opentable reservation parser in Golang. With an optional gRPC service and Node.js binding-ish module.
https://github.com/euforic/opentable
golang nodejs opentable parser
Last synced: 5 months ago
JSON representation
Basic Opentable reservation parser in Golang. With an optional gRPC service and Node.js binding-ish module.
- Host: GitHub
- URL: https://github.com/euforic/opentable
- Owner: euforic
- License: mit
- Created: 2017-07-22T01:32:40.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-10T21:17:32.000Z (over 8 years ago)
- Last Synced: 2024-06-20T04:44:07.534Z (about 2 years ago)
- Topics: golang, nodejs, opentable, parser
- Language: Go
- Homepage:
- Size: 11.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Opentable
Opentable reservation scraper in golang with nodejs client and gRPC server / client.
This code base is meant to serve as an example for creating a simple scraper, gRPC service,
and Golang <=> Node.js communication. Odds are this will not be maintained. :-(
**Personal use only! May violate Opentable's [T&C #13](https://www.opentable.com/legal/terms-and-conditions).**
[](https://godoc.org/github.com/euforic/opentable)

[](https://goreportcard.com/report/github.com/euforic/opentable)
## CLI Usage
```bash
$ opentable client search --direct --people 2 --date_time 2017-08-11+15:30 --latitude 33.611746 --longitude -117.7487 --term italian --sort Rating
```
## Nodejs Usage
### Request
```js
let client = new opentable.Client()
client.search({
covers: 2, // number of people attending
Limit: 200, // number of results to show
dateTime: new Date(), // date/time of reservation
term: 'italian', // search term used to narrow search
sort: 'Rating', // sort by [Distance, Popularity, Name, Rating]
latitude: '33.611746', // latitude of location to search
longitude: '-117.7487', // longitude of location to search
}).then(data => {
console.log(JSON.stringify(data, null, " "))
}).catch(err => {
console.log(err)
})
```
### Response
```js
{
"350182": {
"ID": "350182",
"Name": "Alessa by Chef Pirozzi",
"URL": "https://opentable.com/restaurant/profile/350182?p=2&sd=2017-08-02%2014%3A30",
"Recommended": "97%",
"Reservations": [
{
"Time": "2017-08-02T14:30:00Z",
"URL": "https://opentable.com/book/validate?rid=350182&d=2017-08-02 14:30&p=2&pt=100&ss=0&sd=2017-08-02 14:30&pofids=&hash=490905459"
},
//...
]
},
//...
}