Sha256: ec1558816ad9cdf1cb41ad2c91aafb1461eff1d659ea8729b47905cac9c0ea69

Contents?: true

Size: 762 Bytes

Versions: 75

Compression:

Stored size: 762 Bytes

Contents

require 'rubygems'
require 'amee'
require 'optparse'

# Command-line options - get username, password, and server
options = {}
OptionParser.new do |opts|
  opts.on("-u", "--username USERNAME", "AMEE username") do |u|
    options[:username] = u
  end  
  opts.on("-p", "--password PASSWORD", "AMEE password") do |p|
    options[:password] = p
  end
  opts.on("-s", "--server SERVER", "AMEE server") do |s|
    options[:server] = s
  end
end.parse!

# Connect
connection = AMEE::Connection.new(options[:server], options[:username], options[:password])

# List all available profiles
profiles = AMEE::Profile::Profile.list(connection)
puts "#{profiles.size} #{profiles.size == 1 ? "profile" : "profiles"} available in AMEE:"
profiles.each do |p|
  puts p.uid
end


Version data entries

75 entries across 75 versions & 2 rubygems

Version Path
Floppy-amee-0.4.0 examples/list_profiles.rb
Floppy-amee-0.4.1 examples/list_profiles.rb
Floppy-amee-0.4.10 examples/list_profiles.rb
Floppy-amee-0.4.12 examples/list_profiles.rb
Floppy-amee-0.4.13 examples/list_profiles.rb
Floppy-amee-0.4.14 examples/list_profiles.rb
Floppy-amee-0.4.15 examples/list_profiles.rb
Floppy-amee-0.4.16 examples/list_profiles.rb
Floppy-amee-0.4.17 examples/list_profiles.rb
Floppy-amee-0.4.18 examples/list_profiles.rb
Floppy-amee-0.4.19 examples/list_profiles.rb
Floppy-amee-0.4.2 examples/list_profiles.rb
Floppy-amee-0.4.20 examples/list_profiles.rb
Floppy-amee-0.4.21 examples/list_profiles.rb
Floppy-amee-0.4.22 examples/list_profiles.rb
Floppy-amee-0.4.23 examples/list_profiles.rb
Floppy-amee-0.4.24 examples/list_profiles.rb
Floppy-amee-0.4.25 examples/list_profiles.rb
Floppy-amee-0.4.26 examples/list_profiles.rb
Floppy-amee-0.4.27 examples/list_profiles.rb