Sha256: 50c8df6f9415ee70c4b8492ae45e18d8c8a46fb879cdde0e613bf65e49600594

Contents?: true

Size: 739 Bytes

Versions: 3

Compression:

Stored size: 739 Bytes

Contents

dir = File.dirname(__FILE__) + '/../lib'
$LOAD_PATH << dir unless $LOAD_PATH.include?(dir)

#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])

# Create a new profile
profile = AMEE::Profile.create(connection)
puts "#{profile.uid} created"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
Floppy-amee-0.2.3 examples/create_profile.rb
Floppy-amee-0.3.0 examples/create_profile.rb
Floppy-amee-0.3.1 examples/create_profile.rb