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

add function to get rapidpro groups #130

Merged
merged 9 commits into from
Jan 26, 2022
Merged

add function to get rapidpro groups #130

merged 9 commits into from
Jan 26, 2022

Conversation

IsaackMwenda
Copy link
Contributor

@IsaackMwenda IsaackMwenda commented Jan 17, 2022

Adds new functions to support automated advert sync to rapid_pro.

Comment on lines 303 to 306
:param before: modified before
:type before: datetime
:param after: modified after
:type before: datetime
Copy link
Member

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

Copy link
Contributor Author

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))
Copy link
Member

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?

Copy link
Contributor Author

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.

@IsaackMwenda IsaackMwenda merged commit e278030 into master Jan 26, 2022
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