Class: BrickFTP::RESTfulAPI::ListPublicKeys
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::ListPublicKeys
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/list_public_keys.rb
Overview
List public keys
Instance Method Summary collapse
-
#call(id) ⇒ Array<BrickFTP::Types::UserPublicKey>
Returns a list of all public keys for a user on the current site.
Methods included from Command
Instance Method Details
#call(id) ⇒ Array<BrickFTP::Types::UserPublicKey>
Returns a list of all public keys for a user on the current site.
19 20 21 22 23 |
# File 'lib/brick_ftp/restful_api/list_public_keys.rb', line 19 def call(id) res = client.get("/api/rest/v1/users/#{id}/public_keys.json") res.map { |i| BrickFTP::Types::UserPublicKey.new(**i.symbolize_keys) } end |