-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add started_before and started_after to run list #513
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
Conversation
| offset=offset, | ||
| desc=desc, | ||
| status=status_param, | ||
| startedBefore=started_before, |
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.
not sure what is the best way to handle camelCase translation here?
We need to send it as startedBefore/startedAfter to API
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.
We do this for other parameters as well, so I believe it'll work 😄
(you can test it on a beta release, once this is merged)
barjin
left a comment
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.
That was fast! :) I'm not a Python dev, but the timezone handling IMO needs a bit more care here.
src/apify_client/_http_client.py
Outdated
| elif isinstance(value, list): | ||
| parsed_params[key] = ','.join(value) | ||
| elif isinstance(value, datetime): | ||
| utc_aware_dt = value.replace(tzinfo=timezone.utc) |
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.
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.
Good point, I refactored it to use astimezone
vdusek
left a comment
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.
LGTM
| offset=offset, | ||
| desc=desc, | ||
| status=status_param, | ||
| startedBefore=started_before, |
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.
We do this for other parameters as well, so I believe it'll work 😄
(you can test it on a beta release, once this is merged)
barjin
left a comment
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.
lgtm now, thank you @danpoletaev ! 🔥

This PR adds new options to
RunCollectionClient.list():started_beforeandstarted_after.Same PR in JS: apify/apify-client-js#763