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 method to check if user exists #6

Open
MiriamSexton opened this issue Oct 21, 2016 · 1 comment
Open

add method to check if user exists #6

MiriamSexton opened this issue Oct 21, 2016 · 1 comment
Assignees

Comments

@MiriamSexton
Copy link
Member

part of #5

pull from https://github.com/industrydive/sailthru_tools/blob/master/hosted_pages/tests/sailthru_user_factory.py#L16

@MiriamSexton MiriamSexton self-assigned this Oct 21, 2016
@elidickinson
Copy link
Member

I struggle a little with how much abstraction we want to insert between the interface this library provides and what actually needs to happen with the API. Adding a user_exists function would be ideal for consumers of this library, but if they use it to write code like:

if client.user_exists(email):
    data = client.get_user(email)

Then they've actually called the get_user API twice in a row. Would it be better to just have get_user throw an easily catchable Exception class in the event a user doesn't exist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants