8000 #1 moved auth parsing to signin method by shinchris · Pull Request #5 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

#1 moved auth parsing to signin method #5

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

Merged
merged 2 commits into from
Sep 6, 2016

Conversation

shinchris
Copy link
Contributor

No description provided.

@shinchris shinchris changed the title moved auth parsing to signin method #1 moved auth parsing to signin method Sep 2, 2016
@graysonarts
Copy link
Contributor

🚀 means ship it. Make sure with the green merge button, click the down arrow and select Squash and Merge for the pull request. It's less important with this checkin, but if there is code review feedback, this will allow you to show a single merge.

site_id = parsed_response.find('.//t:site', namespaces=NAMESPACE).get('id', None)
user_id = parsed_response.find('.//t:user', namespaces=NAMESPACE).get('id', None)
auth_token = parsed_response.find('t:credentials', namespaces=NAMESPACE).get('token', None)
self.parent_srv._set_auth(site_id, user_id, auth_token)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mostly style, but if this is getting called from outside the class/module, maybe it isn't really 'private' and doesn't need the '_' prefix.

Copy link
Contributor

Choose a reason for hiding this comment

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

Our convention is any function call that is not intended for users to use should start with _. In this case, I think this fits that definition. @shinchris Do the users of the library ever have a handle to the endpoints? I don't remember

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Users can access the endpoints through the server class. Is that what you're asking?
Also I used the _ prefix because it's not intended for users to set the site_id, user_id, and auth_token.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense -- I do like the convention, wasn't sure if it was supposed to be user-facing or not.

Copy link
Contributor
@graysonarts graysonarts Sep 3, 2016

Choose a reason for hiding this comment

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

@shinchris That's exactly what I was asking :) I thought that was the case, but couldn't remember off the top of my head. 🚀 🚀 🚀

@t8y8
Copy link
Collaborator
t8y8 commented Sep 6, 2016

🚀

Two small things

@shinchris shinchris merged commit cfa1f55 into development Sep 6, 2016
@shinchris shinchris deleted the bugfix-1-rename_from_response branch September 6, 2016 18:48
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
0