feat: add started_before and started_after to run list#513
feat: add started_before and started_after to run list#513danpoletaev merged 2 commits intomasterfrom
Conversation
| offset=offset, | ||
| desc=desc, | ||
| status=status_param, | ||
| startedBefore=started_before, |
There was a problem hiding this comment.
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.
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.
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.
Good point, I refactored it to use astimezone
| offset=offset, | ||
| desc=desc, | ||
| status=status_param, | ||
| startedBefore=started_before, |
There was a problem hiding this comment.
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.
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