abrom / rocketchat-ruby

Ruby wrapper for RocketChat v1 REST API
MIT License
33 stars 24 forks source link

Users methods #1

Closed reist closed 7 years ago

reist commented 7 years ago

These are users.info and users.delete, tested against RocketChat 0.54.2+.

reist commented 7 years ago

The invalid user error is really a user not found error in both users.info and users.delete. For users.info it doesn't make sense to do anything but return nil, as that's a sensible response to a working find call. For users.delete, I don't have a strong opinion as both false and a raise make sense. If you prefer, I can change it.

About setAvatar, I needed only the URL part of it. Adding file support is a bit more complex, so I thought about adding it at a later point.

I'm fine with the changes you made.

abrom commented 7 years ago

Fair enough 👍