Skip to content

Instantly share code, notes, and snippets.

@manveru
Created October 3, 2012 14:36
Show Gist options
  • Save manveru/3827247 to your computer and use it in GitHub Desktop.
Save manveru/3827247 to your computer and use it in GitHub Desktop.
ironworker and twilio
require 'twilio-ruby'
Twilio::REST::Client.new(
@params['twilio']['sid'],
@params['twilio']['token']
).account.calls.create(
from: @params['twilio']['from'],
to: @params['to'],
url: @params['twilio']['url'],
)
runtime "ruby"
gem "twilio-ruby"
exec "call.rb"
twilio:
sid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
from: +43000000000
url: https://demo.twilio.com/welcome/voice/
to: +43000000000
require 'iron_worker_ng'
require 'yaml'
IronWorkerNG::Client.new.schedules.create(
"call",
YAML.load_file('config.yml'),
{start_at: Time.now, run_every: 60, run_times: 2}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment