plivo 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plivo.rb +20 -3
- metadata +8 -8
data/lib/plivo.rb
CHANGED
@@ -532,12 +532,16 @@ module Plivo
|
|
532
532
|
def addMessage(body, attributes={})
|
533
533
|
return add(Message.new(body, attributes))
|
534
534
|
end
|
535
|
+
|
536
|
+
def addDTMF(body, attributes={})
|
537
|
+
return add(DTMF.new(body, attributes))
|
538
|
+
end
|
535
539
|
end
|
536
540
|
|
537
541
|
|
538
542
|
class Response < Element
|
539
543
|
@nestables = ['Speak', 'Play', 'GetDigits', 'Record', 'Dial', 'Message',
|
540
|
-
|
544
|
+
'Redirect', 'Wait', 'Hangup', 'PreAnswer', 'Conference', 'DTMF']
|
541
545
|
@valid_attributes = []
|
542
546
|
|
543
547
|
def initialize()
|
@@ -617,7 +621,7 @@ module Plivo
|
|
617
621
|
@nestables = ['Speak', 'Play', 'Wait']
|
618
622
|
@valid_attributes = ['action', 'method', 'timeout', 'finishOnKey',
|
619
623
|
'numDigits', 'retries', 'invalidDigitsSound',
|
620
|
-
'validDigits', 'playBeep']
|
624
|
+
'validDigits', 'playBeep', 'redirect']
|
621
625
|
|
622
626
|
def initialize(attributes={})
|
623
627
|
super(nil, attributes)
|
@@ -695,7 +699,7 @@ module Plivo
|
|
695
699
|
|
696
700
|
|
697
701
|
class PreAnswer < Element
|
698
|
-
@nestables = ['Play', 'Speak', 'GetDigits', 'Wait', 'Redirect', 'Message']
|
702
|
+
@nestables = ['Play', 'Speak', 'GetDigits', 'Wait', 'Redirect', 'Message', 'DTMF']
|
699
703
|
@valid_attributes = []
|
700
704
|
|
701
705
|
def initialize(attributes={})
|
@@ -715,4 +719,17 @@ module Plivo
|
|
715
719
|
super(body, attributes)
|
716
720
|
end
|
717
721
|
end
|
722
|
+
|
723
|
+
class DTMF < Element
|
724
|
+
@nestables = []
|
725
|
+
@valid_attributes = []
|
726
|
+
|
727
|
+
def initialize(body, attributes={})
|
728
|
+
if not body
|
729
|
+
raise PlivoError, 'No digits set for DTMF'
|
730
|
+
end
|
731
|
+
super(body, attributes)
|
732
|
+
end
|
733
|
+
end
|
734
|
+
|
718
735
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plivo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
16
|
-
requirement: &
|
16
|
+
requirement: &11593400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.1.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *11593400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rest-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &11592180 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.7
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *11592180
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: json
|
38
|
-
requirement: &
|
38
|
+
requirement: &11589800 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 1.6.6
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *11589800
|
47
47
|
description: A Ruby gem for interacting with the Plivo Platform
|
48
48
|
email: support@plivo.com
|
49
49
|
executables: []
|