def get(self, *args, **kwargs):
        params = self.params.copy()
        params.update(kwargs)
        page = 1
        while True:
            params['page'] = page
            request = requests.get(self.url, params=params)
            logger.info("Requested {}".format(request.url))
            rows = list(csv.DictReader(io.StringIO(request.text)))
            if not rows:
                logger.debug('No more data')
                return
            for row in rows:
                yield row
            page += 1
Request data and increment page number until response is empty
dataset/ETHPy150Open codefordurham/Durham-Restaurants/eatsmart/locations/durham/api.py/DurhamAPI.get