Class: BrickFTP::RESTfulAPI::GetUser
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::GetUser
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/get_user.rb
Overview
Show a user
Instance Method Summary collapse
-
#call(id) ⇒ BrickFTP::Types::User?
Returns a single user.
Methods included from Command
Instance Method Details
#call(id) ⇒ BrickFTP::Types::User?
Returns a single user.
19 20 21 22 23 24 |
# File 'lib/brick_ftp/restful_api/get_user.rb', line 19 def call(id) res = client.get("/api/rest/v1/users/#{id}.json") return nil if !res || res.empty? BrickFTP::Types::User.new(**res.symbolize_keys) end |