Class: Superbot::Cloud::CLI::Member::ListCommand
- Inherits:
-
BaseCommand
- Object
- Clamp::Command
- LoginRequiredCommand
- OrganizationBasedCommand
- BaseCommand
- Superbot::Cloud::CLI::Member::ListCommand
- Defined in:
- lib/superbot/cloud/cli/member/list_command.rb
Instance Method Summary collapse
Methods inherited from LoginRequiredCommand
Methods included from Validations
Instance Method Details
#execute ⇒ Object
8 9 10 |
# File 'lib/superbot/cloud/cli/member/list_command.rb', line 8 def execute list_members end |
#list_members ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/superbot/cloud/cli/member/list_command.rb', line 12 def list_members api_response = Superbot::Cloud::Api.request(:member_list, params: { organization_name: @organization }) abort api_response[:error] if api_response[:error] puts "Organization: #{api_response[:organization]}" puts "Members:" puts(api_response[:members].map { |m| m[:username] }) end |