Sha256: 7cb7ad40a105c51beea946e0033c2df564693cce91c6cfd7f219bbc65fe3f89f

Contents?: true

Size: 779 Bytes

Versions: 7

Compression:

Stored size: 779 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'lib')

$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', '..')

require 'connfu'

require 'examples/provisioning/setup'

ARGV.length < 2 and
    (
    puts "Please include as argument the api_key, the channel and optionally the phone number"
    exit
    )

api_key = ARGV.shift

channel = ARGV.shift

number = if ARGV.length < 1
                ""
              else
                ARGV.shift
              end


Connfu.log_level = Logger::DEBUG

application = Connfu::Provisioning::Application.new(api_key, CONNFU_ENDPOINT)


begin
  phones = application.get_phones(channel, number)
  p phones
rescue Exception => ex
  puts "There was an error:"
  puts "Exception message: #{ex.message}"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
connfu-client-0.1.6 examples/provisioning/voice/phones/get.rb
connfu-client-0.1.5 examples/provisioning/voice/phones/get.rb
connfu-client-0.1.4 examples/provisioning/voice/phones/get.rb
connfu-client-0.1.3 examples/provisioning/voice/phones/get.rb
connfu-client-0.1.2 examples/provisioning/voice/phones/get.rb
connfu-client-0.1.1 examples/provisioning/voice/phones/get.rb
connfu-client-0.1 examples/provisioning/voice/phones/get.rb