zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
361 stars 362 forks source link

api: Refactor GET /users endpoint. #546

Closed akashaviator closed 4 years ago

akashaviator commented 4 years ago

This adds binding for GET ../users/{id} endpoint.

akashaviator commented 4 years ago

@timabbott added the space after , .

akashaviator commented 4 years ago

@timabbott made those changes. I was trying to rename examples/list-members to list-users , but got "conflicting files" warning here.

timabbott commented 4 years ago

I merged the first commit. For the rename commit, we should make the old function name work for backwards-compatibility. Otherwise, any existing API clients will break on upgrade.

(And once we merge that and do a release, we should make a PR to update the documentation)

akashaviator commented 4 years ago

@timabbott So do you mean that I should create a new wrapper for the same endpoint, named as get_users ?

def get_users(request)
      return get_members(request)
timabbott commented 4 years ago

I was suggesting we rename get_members to get_users and do the wrappers in the other direction.

(That would be more clear about which is the preferred option, the one that's not a wrapper).

akashaviator commented 4 years ago

@timabbott I've updated the PR.

timabbott commented 4 years ago

Merged after adding the comment discussed above, thanks @akashaviator!

We'll probably want to do similar renames to the other items we wanted to change in @orientor's OpenationId PR.