Python wrapper for the Resy API (resy.com).
Features:
- Automatic retries
- partial endpoint coverage (only endpoints that I could find)
- Useful exception classes
Dependencies:
- requests
- simplejson
- urllib
# from within resy directory
pip install .
# standard package import
import resy
# load the key as part of object creation
r = resy.Resy('API KEY')
# or create object with set_key method
r = resy.Resy()
r.set_key('API KEY')
# use native pythonic calls
r.location(lat=40.7643304, long=-73.9772046, radius=1)
# or pass parameters as a dictionary
r.location({'lat':40.7643304, 'long': -73.9772046, 'radius': 1})
# use native pythonic calls
r.venues(location_id=1)
# or pass parameters as a dictionary
r.location({'location_id': 1})
# use native pythonic calls
r.venue(location_id=1, url_slug='estela')
# or pass parameters as a dictionary
r.location({'location_id': 1, 'url_slug': 'estela'})
# use native pythonic calls
r.calendar(id=6)
# or pass parameters as a dictionary
r.location({'id': 6})
# use native pythonic calls
r.top(day='2017-06-21', location_id='li', num_seats=2)
# or pass parameters as a dictionary
r.top({'day': '2017-06-21', 'location_id': 'li', 'num_seats': 2})
Note: (if you know more, please let me know.)
location()
venues()
venue()
calendar()
top()
- restructure endpoints to be one-to-one with Resy
- write tests
- find more endpoints
- thanks to mLewisLogic for the basic api structure foursquare