-
Notifications
You must be signed in to change notification settings - Fork 214
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
User v2 #334
User v2 #334
Conversation
Hi @carycheng, thanks for the pull request. Before we can merge it, we need you to sign our Contributor License Agreement. You can do so electronically here: http://opensource.box.com/cla Once you have signed, just add a comment to this pull request saying, "CLA signed". Thanks! |
Pull Request Test Coverage Report for Build 1287
💛 - Coveralls |
""" | ||
url = self.get_url('email_aliases', email_alias.object_id) | ||
response = self._session.delete(url, expect_json_response=False) | ||
return response.ok |
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.
This should just be return email_alias.delete()
Is there any reason this method needs to exist?
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.
The URL this hits is /users/USER_ID/email_aliases/EMAIL_ALIAS_ID
; I wasn't sure if there was a good pattern for encapsulating both in a single object. Is there a better way to handle this sort of case?
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.
Oh, I didn't notice that. I guess this is fine for now then.
Or we can move this implementation into an override of delete()
on EmailAlias, and have it enforce that you give a user
input.
boxsdk/object/user.py
Outdated
'notify': notify, | ||
'force': force, | ||
} | ||
response = self._session.delete(url, params=params, expect_json_response=False) |
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.
This should be return super(User, self).delete(params=params)
No description provided.