Class: BrickFTP::RESTfulAPI::GetPublicKey

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/get_public_key.rb

Overview

Show a public key

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(id) ⇒ BrickFTP::Types::UserPublicKey

Returns a single public key.

Parameters:

  • id (Integer)

    Globally unique identifier of each public key. Each public key is given an ID automatically upon creation.

Returns:



19
20
21
22
23
# File 'lib/brick_ftp/restful_api/get_public_key.rb', line 19

def call(id)
  res = client.get("/api/rest/v1/public_keys/#{id}.json")

  BrickFTP::Types::UserPublicKey.new(**res.symbolize_keys)
end