Sha256: 020cc168c2f85650e71f3ac3b28f22d590ccbd92a301f936b40817573ece609e

Contents?: true

Size: 753 Bytes

Versions: 66

Compression:

Stored size: 753 Bytes

Contents

require 'rubygems'
require 'twilio-ruby'

# print a list of all phone calls, what phone number each was to/from, and how
# much each one cost.

# put your Twilio credentials here. you can find your AccountSid and AuthToken
# at the top of your account dashboard page located at:
#   https://www.twilio.com/user/account
account_sid = 'AC043dcf9844e04758bc3a36a84c29761'
auth_token = '62ea81de3a5b414154eb263595357c69'

# set up a client
client = Twilio::REST::Client.new(account_sid, auth_token)

calls = client.calls.list

begin
  calls.each do |call|
    price = call.price || '0.00' # since apparently prices can be nil...
    puts call.sid + "\t" + call.from + "\t" + call.to + "\t" + price
  end
  calls = calls.next_page
end while not calls.empty?

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
twilio-ruby-5.0.0.rc24 examples/print-call-log.rb
twilio-ruby-5.0.0.rc23 examples/print-call-log.rb
twilio-ruby-5.0.0.rc22 examples/print-call-log.rb
twilio-ruby-5.0.0.rc21 examples/print-call-log.rb
twilio-ruby-5.0.0.rc20 examples/print-call-log.rb
twilio-ruby-5.0.0.rc19 examples/print-call-log.rb
twilio-ruby-5.0.0.rc18 examples/print-call-log.rb
twilio-ruby-4.13.0 examples/print-call-log.rb
twilio-ruby-5.0.0.rc17 examples/print-call-log.rb
twilio-ruby-5.0.0.rc16 examples/print-call-log.rb
twilio-ruby-5.0.0.rc15 examples/print-call-log.rb
twilio-ruby-4.12.1 examples/print-call-log.rb
twilio-ruby-5.0.0.rc14 examples/print-call-log.rb
twilio-ruby-5.0.0.rc13 examples/print-call-log.rb
twilio-ruby-5.0.0.rc12 examples/print-call-log.rb
twilio-ruby-5.0.0.rc11 examples/print-call-log.rb
twilio-ruby-5.0.0.rc10 examples/print-call-log.rb
twilio-ruby-5.0.0.rc9 examples/print-call-log.rb
twilio-ruby-5.0.0.rc8 examples/print-call-log.rb
twilio-ruby-5.0.0.rc7 examples/print-call-log.rb