-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add nango.paginate
helper for sync/action scripts
#1103
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
feaa5e9
Add hardcoded offset-limit pagination helper
omotnyk 99f1792
Use generics in `paginate` helper
omotnyk 800c78c
Move pagination from proxy to sync
omotnyk f7598c1
Add pagination based on `paginate` param
omotnyk 2500967
Add GitHub pagination config to `providers.yaml`
omotnyk 4445f2a
Simplify ifs
omotnyk c0b9eaf
Implement separate method for pagination helper
omotnyk 63dc50d
Support cursor based pagination
omotnyk e22a6a6
Refactor pagination interface
omotnyk 23cc704
Revert generator return types
omotnyk 3733549
Prohibit passing boolean param for `paginate`
omotnyk daae1fe
Specify default limit for Slack and HubSpot
omotnyk a06baf6
Return batch from generator
omotnyk adb682a
Support passing pagination params in body
omotnyk 8d1ef8c
Extract body/params update into helper method
omotnyk 9cf10aa
Fix limit
omotnyk 198653c
Allow specifying page parameter name
omotnyk 4d93b69
Simplify cursor type names
omotnyk 9a3cbd1
Fix config names & allow custom limit param name
omotnyk 6c8656a
Add support for header link rel pagination
omotnyk 7787ed5
Remove 'page' pagination support
omotnyk cbf9b9a
Do not support `limit` parameter
omotnyk a4593ab
Support gettign next URL from reponse body
omotnyk d534f90
Add missing 'parse-link-header' dependency
omotnyk 6f993f6
Rename params for clarity
omotnyk 969e487
Support offset(by count) pagination
omotnyk 91ee000
Backfill pagination params in `providers.yaml`
omotnyk 5e8ef30
Add error logging in case next URL is invalid
omotnyk cc01c72
Unify pagination interfaces
omotnyk 0bbf118
Extact next URL extration into separate method
omotnyk 2722926
Ensure override type safety on compile stage
omotnyk 45920e3
Migrate GitHub integration templates
omotnyk 71434e3
Migrate Slack integration templates
omotnyk 394eedb
Migrate Confluence integration templates
omotnyk 6fc0a9e
Support offset pagination
omotnyk d42d8cb
Convert pagination type to string
omotnyk 299bb04
Migrate Jira integration template
omotnyk 3e9fecc
Revert template updates
omotnyk bec4745
Merge branch 'master' of github.com:NangoHQ/nango into pagination-helper
omotnyk ffde95d
Revert accidental changes
omotnyk bab9e62
Update the interface for link pagination
omotnyk 3336fc9
Cover most of pagination with unit tests
omotnyk 05d4b2d
Update pagination interface
omotnyk 220c233
Slightly optimize offset pagination
omotnyk aff3f00
Replace mentions of `url` with `link`
omotnyk 5129e1b
Use lodash
omotnyk 216c062
bring in latest
khaliqgant 29f3df4
formatting
khaliqgant c691bda
Merge branch 'master' of github.com:NangoHQ/nango into pagination-helper
khaliqgant ec7c58b
initial minor clean up
khaliqgant 8307e09
remove formatting update
khaliqgant b77b030
organizational refactor
khaliqgant e02e11d
add notion and add validation
khaliqgant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tricky thing to understand here IMO is that one is for the response, the other for the request.
Just a suggestion, but we could have:
cursor_path_in_response
cursor_name_in_request
I would also imply the
next_
here.In any case, I would brainstorm about the best names here because they will likely stay a while (unless we break the interface).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my current scheme, I use
path
for something that should be fetched from the response andname
for something that is set on the request later on. I agree thatin_request
/in_response
are a bit more explicit about the way these parameters are going to be used so I like this approach.👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khaliqgant curious to have your opinion on naming!