diff --git a/CHANGELOG.md b/CHANGELOG.md index fd0e629..16dd4a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,29 @@ # Changelog +## 0.1.1 + +- Break out of sync loop for cursor based pagination if `starting_after` is None +- Pass in `per_page` query param to `next_url` + ## 0.1.0 - * Add `sla_applied` and `statistics` objects. + +- Add `sla_applied` and `statistics` objects. ## 0.0.4 - * Adjust `client.py` to use API `v.2.0`. - * Remove `users` and `leads` streams. - * Add `contacts` stream. - * Add support for `cursor` style paging. + +- Adjust `client.py` to use API `v.2.0`. +- Remove `users` and `leads` streams. +- Add `contacts` stream. +- Add support for `cursor` style paging. ## 0.0.3 - * Adjust `client.py` to use API `v.1.4`; fix issues w/ `conversations` and `admins` missinng fields; fix `company_attributes` API version error; fix `write_bookmark` issue when scrolling. + +- Adjust `client.py` to use API `v.1.4`; fix issues w/ `conversations` and `admins` missinng fields; fix `company_attributes` API version error; fix `write_bookmark` issue when scrolling. ## 0.0.2 - * Fix rate limit issue in client.py, intermittently failing in Discover mode. + +- Fix rate limit issue in client.py, intermittently failing in Discover mode. ## 0.0.1 - * Initial commit + +- Initial commit diff --git a/setup.py b/setup.py index 9fd150a..dbfcbfc 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name='tap-intercom', - version='0.1.0', + version='0.1.1', description='Singer.io tap for extracting data from the Intercom API', author='jeff.huth@bytecode.io', classifiers=['Programming Language :: Python :: 3 :: Only'], diff --git a/tap_intercom/sync.py b/tap_intercom/sync.py index 4fa695d..e7c73a9 100644 --- a/tap_intercom/sync.py +++ b/tap_intercom/sync.py @@ -431,7 +431,9 @@ def sync_endpoint(client, #pylint: disable=too-many-branches elif cursor: pagination = data.get('pages', {}).get('next', {}) starting_after = pagination.get('starting_after', None) - next_url = '{}/{}?starting_after={}'.format(client.base_url, path, starting_after) + if starting_after is None: + break + next_url = '{}/{}?starting_after={}&per_page={}'.format(client.base_url, path, starting_after, limit) else: next_url = data.get('pages', {}).get('next', None)