Class: Vkit::CLI::Commands::AgentTokensListCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Vkit::CLI::Commands::AgentTokensListCommand
- Defined in:
- lib/vkit/cli/commands/agent_tokens_list_command.rb
Instance Method Summary collapse
Instance Method Details
#call(options) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vkit/cli/commands/agent_tokens_list_command.rb', line 10 def call() format = [:format] || "table" with_auth do user = credential_store.user org = user["organization_slug"] response = authenticated_client.get( "/api/v1/orgs/#{org}/agent_tokens", params: build_query() ) tokens = response["tokens"] || [] print_result(tokens, format) end end |