class BrickFTP::RESTfulAPI::GetAPIKey

Show an API key

@see developers.files.com/#show-an-api-key Show an API key

Public Instance Methods

call(id) click to toggle source

Returns a single API key.

@param [Integer] id Globally unique identifier of each user API key.

Each user API key is given an ID automatically upon creation.

@return [BrickFTP::Types::UserAPIKey] User's API key

# 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