def get(self): try: offset = request.args.get('offset', type=int, default=0) limit = request.args.get('limit', type=int, default=18) data = scraper.getGastroPlaces(offset, limit) return scraper.makeResponseData('success', 'Gastro-Places', data) except: return scraper.makeResponseData('failure', 'Gastro-Places')
def get(self, country): try: offset = request.args.get('offset', type=int, default=0) limit = request.args.get('limit', type=int, default=16) data = scraper.getFoodandDrink(country, offset, limit) return scraper.makeResponseData('success', 'unique-food-and-drink', data) except: return scraper.makeResponseData('failure', 'unique-food-and-drink')
def get(self): try: region = request.args.get('region', default=None) data = scraper.getDestinations(region) if region: data['region'] = region return scraper.makeResponseData('success', 'Destinations', data) except: return scraper.makeResponseData('failure', 'Destinations')
def get(self, country): try: city = request.args.get('city', default=None) state = request.args.get('state', default=None) sort = request.args.get('sort', default='ranked') limit = request.args.get('limit', type=int, default=16) offset = request.args.get('offset', type=int, default=0) data = scraper.getAttractions(country, city, state, sort, limit, offset) return scraper.makeResponseData('success', 'Attractions', data) except: return scraper.makeResponseData('failure', 'Attractions')