vonage 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +190 -0
- data/README.md +191 -0
- data/lib/vonage.rb +29 -0
- data/lib/vonage/abstract_authentication.rb +9 -0
- data/lib/vonage/account.rb +61 -0
- data/lib/vonage/alerts.rb +72 -0
- data/lib/vonage/applications.rb +148 -0
- data/lib/vonage/applications/list_response.rb +11 -0
- data/lib/vonage/authentication_error.rb +6 -0
- data/lib/vonage/basic.rb +13 -0
- data/lib/vonage/bearer_token.rb +14 -0
- data/lib/vonage/client.rb +134 -0
- data/lib/vonage/client_error.rb +6 -0
- data/lib/vonage/config.rb +208 -0
- data/lib/vonage/conversations.rb +210 -0
- data/lib/vonage/conversations/events.rb +73 -0
- data/lib/vonage/conversations/legs.rb +30 -0
- data/lib/vonage/conversations/members.rb +104 -0
- data/lib/vonage/conversations/users.rb +93 -0
- data/lib/vonage/conversions.rb +19 -0
- data/lib/vonage/entity.rb +51 -0
- data/lib/vonage/error.rb +6 -0
- data/lib/vonage/errors.rb +51 -0
- data/lib/vonage/files.rb +26 -0
- data/lib/vonage/form_data.rb +11 -0
- data/lib/vonage/gsm7.rb +13 -0
- data/lib/vonage/http.rb +43 -0
- data/lib/vonage/json.rb +17 -0
- data/lib/vonage/jwt.rb +43 -0
- data/lib/vonage/key_secret_params.rb +20 -0
- data/lib/vonage/keys.rb +51 -0
- data/lib/vonage/logger.rb +60 -0
- data/lib/vonage/messages.rb +25 -0
- data/lib/vonage/namespace.rb +118 -0
- data/lib/vonage/number_insight.rb +140 -0
- data/lib/vonage/numbers.rb +196 -0
- data/lib/vonage/numbers/list_response.rb +11 -0
- data/lib/vonage/numbers/response.rb +8 -0
- data/lib/vonage/params.rb +27 -0
- data/lib/vonage/pricing.rb +30 -0
- data/lib/vonage/pricing_types.rb +18 -0
- data/lib/vonage/redact.rb +37 -0
- data/lib/vonage/response.rb +25 -0
- data/lib/vonage/secrets.rb +85 -0
- data/lib/vonage/secrets/list_response.rb +11 -0
- data/lib/vonage/server_error.rb +6 -0
- data/lib/vonage/signature.rb +53 -0
- data/lib/vonage/sms.rb +121 -0
- data/lib/vonage/tfa.rb +14 -0
- data/lib/vonage/user_agent.rb +16 -0
- data/lib/vonage/verify.rb +253 -0
- data/lib/vonage/version.rb +5 -0
- data/lib/vonage/voice.rb +250 -0
- data/lib/vonage/voice/dtmf.rb +26 -0
- data/lib/vonage/voice/list_response.rb +11 -0
- data/lib/vonage/voice/stream.rb +44 -0
- data/lib/vonage/voice/talk.rb +48 -0
- data/vonage.gemspec +26 -0
- metadata +155 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Vonage
|
5
|
+
class Voice::DTMF < Namespace
|
6
|
+
self.authentication = BearerToken
|
7
|
+
|
8
|
+
self.request_body = JSON
|
9
|
+
|
10
|
+
# Play DTMF tones into a call.
|
11
|
+
#
|
12
|
+
# @option params [String] :digits
|
13
|
+
# The digits to send.
|
14
|
+
#
|
15
|
+
# @param [String] id
|
16
|
+
# @param [Hash] params
|
17
|
+
#
|
18
|
+
# @return [Response]
|
19
|
+
#
|
20
|
+
# @see https://developer.nexmo.com/api/voice#startDTMF
|
21
|
+
#
|
22
|
+
def send(id, params)
|
23
|
+
request('/v1/calls/' + id + '/dtmf', params: params, type: Put)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Vonage
|
5
|
+
class Voice::Stream < Namespace
|
6
|
+
self.authentication = BearerToken
|
7
|
+
|
8
|
+
self.request_body = JSON
|
9
|
+
|
10
|
+
# Play an audio file into a call.
|
11
|
+
#
|
12
|
+
# @option params [required, Array<String>] :stream_url
|
13
|
+
# URL of the audio file.
|
14
|
+
#
|
15
|
+
# @option params [Integer] :loop
|
16
|
+
# The number of times to play the file, 0 for infinite.
|
17
|
+
#
|
18
|
+
# @option params [String] :level
|
19
|
+
# Set the audio level of the stream in the range -1 >= level <= 1 with a precision of 0.1. The default value is 0.
|
20
|
+
#
|
21
|
+
# @param [String] id
|
22
|
+
# @param [Hash] params
|
23
|
+
#
|
24
|
+
# @return [Response]
|
25
|
+
#
|
26
|
+
# @see https://developer.nexmo.com/api/voice#startStream
|
27
|
+
#
|
28
|
+
def start(id, params)
|
29
|
+
request('/v1/calls/' + id + '/stream', params: params, type: Put)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Stop playing an audio file into a call.
|
33
|
+
#
|
34
|
+
# @param [String] id
|
35
|
+
#
|
36
|
+
# @return [Response]
|
37
|
+
#
|
38
|
+
# @see https://developer.nexmo.com/api/voice#stopStream
|
39
|
+
#
|
40
|
+
def stop(id)
|
41
|
+
request('/v1/calls/' + id + '/stream', type: Delete)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Vonage
|
5
|
+
class Voice::Talk < Namespace
|
6
|
+
self.authentication = BearerToken
|
7
|
+
|
8
|
+
self.request_body = JSON
|
9
|
+
|
10
|
+
# Play text to speech into a call.
|
11
|
+
#
|
12
|
+
# @option params [required, String] :text
|
13
|
+
# The text to read.
|
14
|
+
#
|
15
|
+
# @option params [String] :voice_name
|
16
|
+
# The voice & language to use.
|
17
|
+
#
|
18
|
+
# @option params [Integer] :loop
|
19
|
+
# The number of times to repeat the text the file, 0 for infinite.
|
20
|
+
#
|
21
|
+
# @option params [String] :level
|
22
|
+
# The volume level that the speech is played.
|
23
|
+
# This can be any value between `-1` to `1` in `0.1` increments, with `0` being the default.
|
24
|
+
#
|
25
|
+
# @param [String] id
|
26
|
+
# @param [Hash] params
|
27
|
+
#
|
28
|
+
# @return [Response]
|
29
|
+
#
|
30
|
+
# @see https://developer.nexmo.com/api/voice#startTalk
|
31
|
+
#
|
32
|
+
def start(id, params)
|
33
|
+
request('/v1/calls/' + id + '/talk', params: params, type: Put)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Stop text to speech in a call.
|
37
|
+
#
|
38
|
+
# @param [String] id
|
39
|
+
#
|
40
|
+
# @return [Response]
|
41
|
+
#
|
42
|
+
# @see https://developer.nexmo.com/api/voice#stopTalk
|
43
|
+
#
|
44
|
+
def stop(id)
|
45
|
+
request('/v1/calls/' + id + '/talk', type: Delete)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/vonage.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('lib/vonage/version', File.dirname(__FILE__))
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = 'vonage'
|
5
|
+
s.version = Vonage::VERSION
|
6
|
+
s.license = 'Apache-2.0'
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ['Vonage']
|
9
|
+
s.email = ['devrel@vonage.com']
|
10
|
+
s.homepage = 'https://github.com/Vonage/vonage-ruby-sdk'
|
11
|
+
s.description = 'Vonage Server SDK for Ruby'
|
12
|
+
s.summary = 'This is the Ruby Server SDK for Vonage APIs. To use it you\'ll need a Vonage account. Sign up for free at https://www.vonage.com'
|
13
|
+
s.files = Dir.glob('lib/**/*.rb') + %w(LICENSE.txt README.md vonage.gemspec)
|
14
|
+
s.required_ruby_version = '>= 2.5.0'
|
15
|
+
s.add_dependency('nexmo-jwt', '~> 0.1.1')
|
16
|
+
s.add_dependency('zeitwerk', '~> 2', '>= 2.2')
|
17
|
+
s.add_dependency('sorbet-runtime', '~> 0.5')
|
18
|
+
s.require_path = 'lib'
|
19
|
+
s.metadata = {
|
20
|
+
'homepage' => 'https://github.com/Vonage/vonage-ruby-sdk',
|
21
|
+
'source_code_uri' => 'https://github.com/Vonage/vonage-ruby-sdk',
|
22
|
+
'bug_tracker_uri' => 'https://github.com/Vonage/vonage-ruby-sdk/issues',
|
23
|
+
'changelog_uri' => 'https://github.com/Vonage/vonage-ruby-sdk/blob/master/CHANGES.md',
|
24
|
+
'documentation_uri' => 'https://www.rubydoc.info/github/vonage/vonage-ruby-sdk'
|
25
|
+
}
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vonage
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 7.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vonage
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nexmo-jwt
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: zeitwerk
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '2.2'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '2.2'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sorbet-runtime
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.5'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.5'
|
61
|
+
description: Vonage Server SDK for Ruby
|
62
|
+
email:
|
63
|
+
- devrel@vonage.com
|
64
|
+
executables: []
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- lib/vonage.rb
|
71
|
+
- lib/vonage/abstract_authentication.rb
|
72
|
+
- lib/vonage/account.rb
|
73
|
+
- lib/vonage/alerts.rb
|
74
|
+
- lib/vonage/applications.rb
|
75
|
+
- lib/vonage/applications/list_response.rb
|
76
|
+
- lib/vonage/authentication_error.rb
|
77
|
+
- lib/vonage/basic.rb
|
78
|
+
- lib/vonage/bearer_token.rb
|
79
|
+
- lib/vonage/client.rb
|
80
|
+
- lib/vonage/client_error.rb
|
81
|
+
- lib/vonage/config.rb
|
82
|
+
- lib/vonage/conversations.rb
|
83
|
+
- lib/vonage/conversations/events.rb
|
84
|
+
- lib/vonage/conversations/legs.rb
|
85
|
+
- lib/vonage/conversations/members.rb
|
86
|
+
- lib/vonage/conversations/users.rb
|
87
|
+
- lib/vonage/conversions.rb
|
88
|
+
- lib/vonage/entity.rb
|
89
|
+
- lib/vonage/error.rb
|
90
|
+
- lib/vonage/errors.rb
|
91
|
+
- lib/vonage/files.rb
|
92
|
+
- lib/vonage/form_data.rb
|
93
|
+
- lib/vonage/gsm7.rb
|
94
|
+
- lib/vonage/http.rb
|
95
|
+
- lib/vonage/json.rb
|
96
|
+
- lib/vonage/jwt.rb
|
97
|
+
- lib/vonage/key_secret_params.rb
|
98
|
+
- lib/vonage/keys.rb
|
99
|
+
- lib/vonage/logger.rb
|
100
|
+
- lib/vonage/messages.rb
|
101
|
+
- lib/vonage/namespace.rb
|
102
|
+
- lib/vonage/number_insight.rb
|
103
|
+
- lib/vonage/numbers.rb
|
104
|
+
- lib/vonage/numbers/list_response.rb
|
105
|
+
- lib/vonage/numbers/response.rb
|
106
|
+
- lib/vonage/params.rb
|
107
|
+
- lib/vonage/pricing.rb
|
108
|
+
- lib/vonage/pricing_types.rb
|
109
|
+
- lib/vonage/redact.rb
|
110
|
+
- lib/vonage/response.rb
|
111
|
+
- lib/vonage/secrets.rb
|
112
|
+
- lib/vonage/secrets/list_response.rb
|
113
|
+
- lib/vonage/server_error.rb
|
114
|
+
- lib/vonage/signature.rb
|
115
|
+
- lib/vonage/sms.rb
|
116
|
+
- lib/vonage/tfa.rb
|
117
|
+
- lib/vonage/user_agent.rb
|
118
|
+
- lib/vonage/verify.rb
|
119
|
+
- lib/vonage/version.rb
|
120
|
+
- lib/vonage/voice.rb
|
121
|
+
- lib/vonage/voice/dtmf.rb
|
122
|
+
- lib/vonage/voice/list_response.rb
|
123
|
+
- lib/vonage/voice/stream.rb
|
124
|
+
- lib/vonage/voice/talk.rb
|
125
|
+
- vonage.gemspec
|
126
|
+
homepage: https://github.com/Vonage/vonage-ruby-sdk
|
127
|
+
licenses:
|
128
|
+
- Apache-2.0
|
129
|
+
metadata:
|
130
|
+
homepage: https://github.com/Vonage/vonage-ruby-sdk
|
131
|
+
source_code_uri: https://github.com/Vonage/vonage-ruby-sdk
|
132
|
+
bug_tracker_uri: https://github.com/Vonage/vonage-ruby-sdk/issues
|
133
|
+
changelog_uri: https://github.com/Vonage/vonage-ruby-sdk/blob/master/CHANGES.md
|
134
|
+
documentation_uri: https://www.rubydoc.info/github/vonage/vonage-ruby-sdk
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 2.5.0
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubygems_version: 3.0.0
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: This is the Ruby Server SDK for Vonage APIs. To use it you'll need a Vonage
|
154
|
+
account. Sign up for free at https://www.vonage.com
|
155
|
+
test_files: []
|