-
Notifications
You must be signed in to change notification settings - Fork 2
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
add function to get rapidpro groups #130
Conversation
rapid_pro_tools/rapid_pro_client.py
Outdated
:param before: modified before | ||
:type before: datetime | ||
:param after: modified after | ||
:type before: datetime |
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.
Elsewhere in this file we called this last_modified_before_exclusive and last_modified_after_inclusive. I suggest doing the same here so it's super unambiguous what the filter means without needing to check the api docs
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.
Updated thanks.
:rtype: temba_client.v2.types.Group | ||
""" | ||
|
||
return self._retry_on_rate_exceed(lambda: self.rapid_pro.create_group(name=name)) |
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.
Does this fail if the group already exists?
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.
If the group exists, rapid pro will add a suffix 1,2.. and create a group with the modified name. Have updated the docstrings to highlight this thanks.
Adds new functions to support automated advert sync to rapid_pro.