Class: User
- Inherits:
-
Base
show all
- Defined in:
- lib/mattermost/models/user.rb
Instance Method Summary
collapse
Methods inherited from Base
#attributes, #first, #initialize, #last, #to_json
Constructor Details
This class inherits a constructor from Base
Instance Method Details
#preferences ⇒ Object
12
13
14
|
# File 'lib/mattermost/models/user.rb', line 12
def preferences
Mattermost.get("/preferences")
end
|
#reset_password(new_password) ⇒ Object
3
4
5
6
|
# File 'lib/mattermost/models/user.rb', line 3
def reset_password(new_password)
payload = {:name => Mattermost.team.name, :user_id => self.id, :new_password => new_password}
Mattermost.post("/users/reset_password", :body => payload.to_json)
end
|
#status ⇒ Object
8
9
10
|
# File 'lib/mattermost/models/user.rb', line 8
def status
Mattermost::User.status([self.id])[self.id]
end
|