bandwidth-sdk 10.3.0 → 10.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +1 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/start_recording.rb +1 -0
- data/lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb +12 -0
- data/test/integration/test_integration.rb +4 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f011b72b189da15e3b1b43201601250454cbd2c348c9b13629c0f4b8eb02838
|
4
|
+
data.tar.gz: dc058e532b3e089f6591bd41d6b2984cd2ef2ba1d44f61c609e9253c918192cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c76196ab9c8c40578883f4963b2f7b6cd368b63a8304380344f8820deae79569c13a262da25e06ba2cc3f0cf8cfa81f11b6a35080dd829ba978f07b22d6884d5
|
7
|
+
data.tar.gz: 2ee584741d90c28ea2b465dffcccdbed815f7a2b38b8517bcb123ccd5378bbee227a901dff9679449572f5e45ecbda36f47252a10bdb1209697a77101a52f838
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bandwidth Ruby SDK
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Nightly Tests](https://github.com/Bandwidth/ruby-sdk/actions/workflows/test-nightly.yml/badge.svg)](https://github.com/Bandwidth/ruby-sdk/actions/workflows/test-nightly.yml)
|
4
4
|
|
5
5
|
|
6
6
|
| **OS** | **Ruby** |
|
@@ -19,6 +19,7 @@ module Bandwidth
|
|
19
19
|
'maxDuration' => max_duration,
|
20
20
|
'fileFormat' => file_format,
|
21
21
|
'transcribe' => transcribe,
|
22
|
+
'detectLanguage' => detect_language,
|
22
23
|
'transcriptionAvailableUrl' => transcription_available_url,
|
23
24
|
'transcriptionAvailableMethod' => transcription_available_method,
|
24
25
|
'silenceTimeout' => silence_timeout,
|
@@ -16,6 +16,7 @@ module Bandwidth
|
|
16
16
|
'fileFormat' => file_format,
|
17
17
|
'multiChannel' => multi_channel,
|
18
18
|
'transcribe' => transcribe,
|
19
|
+
'detectLanguage' => detect_language,
|
19
20
|
'transcriptionAvailableUrl' => transcription_available_url,
|
20
21
|
'transcriptionAvailableMethod' => transcription_available_method
|
21
22
|
}))
|
@@ -33,6 +33,10 @@ module Bandwidth
|
|
33
33
|
# @return [Float]
|
34
34
|
attr_accessor :callback_timeout
|
35
35
|
|
36
|
+
# TODO: Write general description for this method
|
37
|
+
# @return [Boolean]
|
38
|
+
attr_accessor :detect_language
|
39
|
+
|
36
40
|
# A mapping from model property names to API property names.
|
37
41
|
def self.names
|
38
42
|
@_hash = {} if @_hash.nil?
|
@@ -42,6 +46,7 @@ module Bandwidth
|
|
42
46
|
@_hash['password'] = 'password'
|
43
47
|
@_hash['tag'] = 'tag'
|
44
48
|
@_hash['callback_timeout'] = 'callbackTimeout'
|
49
|
+
@_hash['detect_language'] = 'detectLanguage'
|
45
50
|
@_hash
|
46
51
|
end
|
47
52
|
|
@@ -54,6 +59,7 @@ module Bandwidth
|
|
54
59
|
password
|
55
60
|
tag
|
56
61
|
callback_timeout
|
62
|
+
detect_language
|
57
63
|
]
|
58
64
|
end
|
59
65
|
|
@@ -65,6 +71,7 @@ module Bandwidth
|
|
65
71
|
password
|
66
72
|
tag
|
67
73
|
callback_timeout
|
74
|
+
detect_language
|
68
75
|
]
|
69
76
|
end
|
70
77
|
|
@@ -73,6 +80,7 @@ module Bandwidth
|
|
73
80
|
username = nil,
|
74
81
|
password = nil,
|
75
82
|
tag = nil,
|
83
|
+
detect_language = nil,
|
76
84
|
callback_timeout = nil)
|
77
85
|
@callback_url = callback_url unless callback_url == SKIP
|
78
86
|
@callback_method = callback_method unless callback_method == SKIP
|
@@ -80,6 +88,7 @@ module Bandwidth
|
|
80
88
|
@password = password unless password == SKIP
|
81
89
|
@tag = tag unless tag == SKIP
|
82
90
|
@callback_timeout = callback_timeout unless callback_timeout == SKIP
|
91
|
+
@detect_language = detect_language unless detect_language == SKIP
|
83
92
|
end
|
84
93
|
|
85
94
|
# Creates an instance of the object from a hash.
|
@@ -95,6 +104,8 @@ module Bandwidth
|
|
95
104
|
tag = hash.key?('tag') ? hash['tag'] : SKIP
|
96
105
|
callback_timeout =
|
97
106
|
hash.key?('callbackTimeout') ? hash['callbackTimeout'] : SKIP
|
107
|
+
detect_language =
|
108
|
+
hash.key?('detectLanguage') ? hash['detectLanguage'] : SKIP
|
98
109
|
|
99
110
|
# Create object from extracted values.
|
100
111
|
TranscribeRecordingRequest.new(callback_url,
|
@@ -102,6 +113,7 @@ module Bandwidth
|
|
102
113
|
username,
|
103
114
|
password,
|
104
115
|
tag,
|
116
|
+
detect_language,
|
105
117
|
callback_timeout)
|
106
118
|
end
|
107
119
|
end
|
@@ -122,7 +122,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|
122
122
|
assert(response.data.enqueued_time.is_a?(DateTime), "enqueued time is not a DateTime object")
|
123
123
|
|
124
124
|
#Get phone call information
|
125
|
-
sleep
|
125
|
+
sleep(15)
|
126
126
|
response = @bandwidth_client.voice_client.client.get_call(BW_ACCOUNT_ID, response.data.call_id)
|
127
127
|
assert(response.data.state.length > 0, "state value not set")
|
128
128
|
assert_not_nil(response.data.enqueued_time, "enqueued time is nil")
|
@@ -151,6 +151,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|
151
151
|
assert(response.data.call_id.length > 0, "call_id value not set")
|
152
152
|
|
153
153
|
#Get phone call information
|
154
|
+
sleep(15)
|
154
155
|
response = @bandwidth_client.voice_client.client.get_call(BW_ACCOUNT_ID, response.data.call_id)
|
155
156
|
assert(response.data.state.length > 0, "state value not set")
|
156
157
|
end
|
@@ -354,6 +355,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|
354
355
|
:recording_available_url => "https://available.com",
|
355
356
|
:recording_available_method => "GET",
|
356
357
|
:transcribe => false,
|
358
|
+
:detect_language=> true,
|
357
359
|
:transcription_available_url => "https://transcribe.com",
|
358
360
|
:transcription_available_method => "POST",
|
359
361
|
:username => "user",
|
@@ -371,7 +373,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|
371
373
|
|
372
374
|
response = Bandwidth::Voice::Response.new()
|
373
375
|
response.push(record)
|
374
|
-
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Record tag="tag" username="user" password="pass" recordCompleteUrl="https://complete.com" recordCompleteMethod="POST" recordingAvailableUrl="https://available.com" recordingAvailableMethod="GET" terminatingDigits="#" maxDuration="3" fileFormat="wav" transcribe="false" transcriptionAvailableUrl="https://transcribe.com" transcriptionAvailableMethod="POST" silenceTimeout="5" recordCompleteFallbackUrl="https://test.com" recordCompleteFallbackMethod="GET" fallbackUsername="fuser" fallbackPassword="fpass"/></Response>'
|
376
|
+
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Record tag="tag" username="user" password="pass" recordCompleteUrl="https://complete.com" recordCompleteMethod="POST" recordingAvailableUrl="https://available.com" recordingAvailableMethod="GET" terminatingDigits="#" maxDuration="3" fileFormat="wav" transcribe="false" detectLanguage="true" transcriptionAvailableUrl="https://transcribe.com" transcriptionAvailableMethod="POST" silenceTimeout="5" recordCompleteFallbackUrl="https://test.com" recordCompleteFallbackMethod="GET" fallbackUsername="fuser" fallbackPassword="fpass"/></Response>'
|
375
377
|
actual = response.to_bxml()
|
376
378
|
assert_equal(expected, actual)
|
377
379
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandwidth-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bandwidth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: '0'
|
331
331
|
requirements: []
|
332
|
-
rubygems_version: 3.4.
|
332
|
+
rubygems_version: 3.4.10
|
333
333
|
signing_key:
|
334
334
|
specification_version: 4
|
335
335
|
summary: Bandwidth
|