Class: Kazoo::Conference
- Inherits:
-
Object
- Object
- Kazoo::Conference
- Defined in:
- lib/kazoo/conference.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
readonly
Returns the value of attribute auth.
Instance Method Summary collapse
- #create_callflow(phone_numbers) ⇒ Object
- #create_room(name, conference_numbers) ⇒ Object
-
#initialize(auth) ⇒ Conference
constructor
A new instance of Conference.
Constructor Details
#initialize(auth) ⇒ Conference
Returns a new instance of Conference.
5 6 7 8 |
# File 'lib/kazoo/conference.rb', line 5 def initialize(auth) instance_variable_set :@auth, auth @base_uri = 'http://' + @auth.host + ":" + @auth.port + '/' + @auth.version + '/' + 'accounts/' + @auth.account_id end |
Instance Attribute Details
#auth ⇒ Object (readonly)
Returns the value of attribute auth.
3 4 5 |
# File 'lib/kazoo/conference.rb', line 3 def auth @auth end |
Instance Method Details
#create_callflow(phone_numbers) ⇒ Object
10 11 12 13 14 |
# File 'lib/kazoo/conference.rb', line 10 def create_callflow(phone_numbers) callflow_url = @base_uri + '/callflows?auth_token=' + @auth.token payload = {'data' => {'numbers' => phone_numbers, 'flow' => {'module' => "conference", 'data' => {}, 'children' => {}}}} Nestful.json_put(callflow_url, {:params => payload}) end |
#create_room(name, conference_numbers) ⇒ Object
16 17 18 19 20 |
# File 'lib/kazoo/conference.rb', line 16 def create_room(name, conference_numbers) room_url = @base_uri + '/conferences?auth_token=' + @auth.token payload = {'data' => {'name' => name, 'conference_numbers' => conference_numbers}} Nestful.json_put(room_url, {:params => payload}) end |