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 upsert_person method to ActionNetwork #734

Merged
merged 4 commits into from
Aug 31, 2022

Conversation

shaunagm
Copy link
Collaborator

@shaunagm shaunagm commented Aug 25, 2022

Also adds deprecation warnings to update_person and add_person.

Addresses #706

cc @Maggiedp

@shaunagm shaunagm requested a review from ydamit August 25, 2022 17:59
Copy link
Contributor

@ydamit ydamit left a comment

Choose a reason for hiding this comment

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

Just a couple of thoughts: an open-ended question and a suggestion for updating logging messages, neither of which should prevent this from getting approved.

@@ -200,8 +204,25 @@ def add_person(self, email_address=None, given_name=None, family_name=None, tags
logger.info(f"Entry {person_id} successfully added to people.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a huge deal, but should probably change this language to reflect the upsert functionality.

Comment on lines 223 to 225
Updates a person's data in Action Network. WARNING: this endpoint has been deprecated in
favor of upsert_person and may not work properly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that we know that the person-specific endpoint does work with PUT requests, do we still think that we want to deprecate this? As an alternative, we could just remove the tagging functionality. For instance, NGPVAN has both upsert and update methods. On the other hand, maybe keeping things simpler is a better approach?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you think the person-specific endpoint is easier to use? If so, we should probably keep it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no reason to believe it is, but I'm afraid I also don't have any reason to believe it isn't. The only thing I know for sure is that the method we're changing to upsert (i.e. the one that uses the helper endpoint) is definitely used, and I have no notion of whether update_person() is used at all. Honestly, I think it matters very little, so I was hoping you'd have a structural, conventional, or even esthetic reason to help make the call.

Copy link
Collaborator Author

@shaunagm shaunagm Aug 25, 2022

Choose a reason for hiding this comment

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

Hmm, yeah. I think conventionally/aesthetically you minimize duplicate calls, but otoh we don't want to break things for people. Not sure which matters more.

@SorenSpicknall SorenSpicknall merged commit 0ba62dc into main Aug 31, 2022
@SorenSpicknall SorenSpicknall deleted the fix-actionnetwork-update-person branch September 26, 2022 18:45
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