Class: CiscoSpark::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/cli.rb

Instance Method Summary collapse

Instance Method Details

#run(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/cli.rb', line 6

def run(options = {})
    case options[:entity]
    when 'people'; rsp = CiscoSpark::People::CLI(options)
    when 'rooms'; rsp = CiscoSpark::Rooms::CLI(options)
    when 'memberships'; rsp = CiscoSpark::Memberships::CLI(options)
    when 'messages'; rsp = CiscoSpark::Messages::CLI(options)
    when 'teams'; rsp = CiscoSpark::Teams::CLI(options)
    when 'teammemberships'; rsp = CiscoSpark::TeamMemberships::CLI(options)
    when 'webhooks'; rsp = CiscoSpark::Webhooks::CLI(options)
    else
        raise "No valid entity specified. run ciscospark -h"
    end
    puts rsp
end