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