Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/python sync actions pagination #183

Closed
wants to merge 7 commits into from

Conversation

kudj
Copy link
Contributor

@kudj kudj commented May 28, 2024

pagination

@kudj kudj marked this pull request as ready for review May 28, 2024 11:06
@kudj kudj requested a review from davidesner May 28, 2024 14:30
Base automatically changed from feature/python-sync-actions to master May 29, 2024 13:13
Copy link
Contributor

@davidesner davidesner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Viz inline comments + je potreba doplnit testy.

@@ -285,6 +293,8 @@ def build_api_request(configuration: dict) -> List[Tuple[ApiRequest, RequestCont

placeholders = endpoint_config.get('placeholders', {})

scroller = endpoint_config.get('scroller')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


if paginator_params.get("method") == "offset":
if paginator_params.get("firstPageParams", True):
paginator[paginator_params.get("offsetParam", "offset")] = paginator_params.get("offset", 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tady bych osobne preferoval, kdyby si ty jednotlivy metody abstrahoval do trid v Configuration nez davat ten kontext o tom jaky parametry to ma mit do component.py sem. Tj kazdej druh pagination by mel svoji classu


return result

def _get_paginator(self, job):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tehle metody chybi return type a jmeno je dost zavadejici. Neni to paginator ale pagination parametry, ale chapu ze to je priprava/zbytek snahy mit opravdovy paginator. Taky chybi typehint u parametru funkce

else:
paginator_params = job.api.pagination.get("common")

if paginator_params.get("method") == "offset":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kudj kudj closed this Jun 10, 2024
@kudj
Copy link
Contributor Author

kudj commented Jun 10, 2024

changes implemented here: #186

@kudj kudj deleted the feature/python-sync-actions-pagination branch June 10, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants