Class: BrickFTP::RESTfulAPI::GetAPIKey

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

Overview

Show an API key

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

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

Returns a single API key.

Parameters:

  • id (Integer)

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

Returns:



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

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

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