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

feat: add ability to login with a Personal access token #52

Merged
merged 9 commits into from
Jul 31, 2018

Conversation

tgly307
Copy link
Contributor

@tgly307 tgly307 commented Jul 31, 2018

  1. Add ability to login with a Personal access token
  2. Remove useless attribute "info" of MattermostClient, its value is same with "user" and no place use it.
  3. The default value of "data" which in post function of MattermostAPI is removed, because the "data" field is not optional, and the type of json.dumps(None) is string, an error will be reported.

@tgly307
Copy link
Contributor Author

tgly307 commented Jul 31, 2018

#51 done

self.user = None
self.info = None
# self.info = None
Copy link
Owner

Choose a reason for hiding this comment

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

If you are getting rid of info, might as well delete these lines instead of commenting them out.

self.login(team, email, password)

def login(self, team, email, password):
self.email = email
self.user = self.api.login(team, email, password)
self.info = self.api.me()
# self.info = self.api.me()
Copy link
Owner

Choose a reason for hiding this comment

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

Same comment as above

Copy link
Owner

@attzonko attzonko left a comment

Choose a reason for hiding this comment

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

Overall looks fine

@tgly307
Copy link
Contributor Author

tgly307 commented Jul 31, 2018

done

@attzonko attzonko added the enhancement New feature or request label Jul 31, 2018
@attzonko attzonko merged commit acc6a05 into attzonko:master Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants