tencentcloud-sdk-vms 1.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-vms.rb +11 -0
- data/lib/v20200902/client.rb +84 -0
- data/lib/v20200902/models.rb +161 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b00c34f89d6a138d2a26fe1518fb70fef42e1b15
|
4
|
+
data.tar.gz: f5d53ff614edd824cb19389616e631f93a24b8e7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 88e13d9ba6430e07f4465d226a403b722f5504dde0b553fec4d9d2fd542e478c7fe72f5827cea35688ab5826f04069c3963b6833bb2262e9239770ade0479ef2
|
7
|
+
data.tar.gz: a059d02008bec7905df731ea62337018978bf0b0bceac1370936dfb2e7136789f64913e7854609596e89eb58f130406b7845d998db06bb1e683a4ee56dd757dd
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.200
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module TencentCloud
|
20
|
+
module Vms
|
21
|
+
module V20200902
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2020-09-02'
|
26
|
+
api_endpoint = 'vms.tencentcloudapi.com'
|
27
|
+
sdk_version = 'VMS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 给用户发语音验证码(仅支持数字)。
|
33
|
+
|
34
|
+
# @param request: Request instance for SendCodeVoice.
|
35
|
+
# @type request: :class:`Tencentcloud::vms::V20200902::SendCodeVoiceRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::vms::V20200902::SendCodeVoiceResponse`
|
37
|
+
def SendCodeVoice(request)
|
38
|
+
body = send_request('SendCodeVoice', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = SendCodeVoiceResponse.new
|
42
|
+
model.deserialize(response['Response'])
|
43
|
+
model
|
44
|
+
else
|
45
|
+
code = response['Response']['Error']['Code']
|
46
|
+
message = response['Response']['Error']['Message']
|
47
|
+
reqid = response['Response']['RequestId']
|
48
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
49
|
+
end
|
50
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
51
|
+
raise e
|
52
|
+
rescue StandardError => e
|
53
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
54
|
+
end
|
55
|
+
|
56
|
+
# 给用户发送指定模板的语音通知。
|
57
|
+
|
58
|
+
# @param request: Request instance for SendTtsVoice.
|
59
|
+
# @type request: :class:`Tencentcloud::vms::V20200902::SendTtsVoiceRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::vms::V20200902::SendTtsVoiceResponse`
|
61
|
+
def SendTtsVoice(request)
|
62
|
+
body = send_request('SendTtsVoice', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = SendTtsVoiceResponse.new
|
66
|
+
model.deserialize(response['Response'])
|
67
|
+
model
|
68
|
+
else
|
69
|
+
code = response['Response']['Error']['Code']
|
70
|
+
message = response['Response']['Error']['Message']
|
71
|
+
reqid = response['Response']['RequestId']
|
72
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
73
|
+
end
|
74
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
75
|
+
raise e
|
76
|
+
rescue StandardError => e
|
77
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,161 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
module TencentCloud
|
18
|
+
module Vms
|
19
|
+
module V20200902
|
20
|
+
# SendCodeVoice请求参数结构体
|
21
|
+
class SendCodeVoiceRequest < TencentCloud::Common::AbstractModel
|
22
|
+
# @param CodeMessage: 验证码,仅支持填写数字,实际播报语音时,会自动在数字前补充语音文本"您的验证码是"。
|
23
|
+
# @type CodeMessage: String
|
24
|
+
# @param CalledNumber: 被叫手机号码,采用 e.164 标准,格式为+[国家或地区码][用户号码]。
|
25
|
+
# 例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。
|
26
|
+
# @type CalledNumber: String
|
27
|
+
# @param VoiceSdkAppid: 在[语音控制台](https://console.cloud.tencent.com/vms)添加应用后生成的实际SdkAppid,示例如1400006666。
|
28
|
+
# @type VoiceSdkAppid: String
|
29
|
+
# @param PlayTimes: 播放次数,可选,最多3次,默认2次。
|
30
|
+
# @type PlayTimes: Integer
|
31
|
+
# @param SessionContext: 用户的 session 内容,腾讯 server 回包中会原样返回。
|
32
|
+
# @type SessionContext: String
|
33
|
+
|
34
|
+
attr_accessor :CodeMessage, :CalledNumber, :VoiceSdkAppid, :PlayTimes, :SessionContext
|
35
|
+
|
36
|
+
def initialize(codemessage=nil, callednumber=nil, voicesdkappid=nil, playtimes=nil, sessioncontext=nil)
|
37
|
+
@CodeMessage = codemessage
|
38
|
+
@CalledNumber = callednumber
|
39
|
+
@VoiceSdkAppid = voicesdkappid
|
40
|
+
@PlayTimes = playtimes
|
41
|
+
@SessionContext = sessioncontext
|
42
|
+
end
|
43
|
+
|
44
|
+
def deserialize(params)
|
45
|
+
@CodeMessage = params['CodeMessage']
|
46
|
+
@CalledNumber = params['CalledNumber']
|
47
|
+
@VoiceSdkAppid = params['VoiceSdkAppid']
|
48
|
+
@PlayTimes = params['PlayTimes']
|
49
|
+
@SessionContext = params['SessionContext']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# SendCodeVoice返回参数结构体
|
54
|
+
class SendCodeVoiceResponse < TencentCloud::Common::AbstractModel
|
55
|
+
# @param SendStatus: 语音验证码发送状态。
|
56
|
+
# @type SendStatus: :class:`Tencentcloud::Vms.v20200902.models.SendStatus`
|
57
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
58
|
+
# @type RequestId: String
|
59
|
+
|
60
|
+
attr_accessor :SendStatus, :RequestId
|
61
|
+
|
62
|
+
def initialize(sendstatus=nil, requestid=nil)
|
63
|
+
@SendStatus = sendstatus
|
64
|
+
@RequestId = requestid
|
65
|
+
end
|
66
|
+
|
67
|
+
def deserialize(params)
|
68
|
+
unless params['SendStatus'].nil?
|
69
|
+
@SendStatus = SendStatus.new
|
70
|
+
@SendStatus.deserialize(params['SendStatus'])
|
71
|
+
end
|
72
|
+
@RequestId = params['RequestId']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# 语音验证码发送状态
|
77
|
+
class SendStatus < TencentCloud::Common::AbstractModel
|
78
|
+
# @param CallId: 标识本次发送 ID,标识一次下发记录。
|
79
|
+
# @type CallId: String
|
80
|
+
# @param SessionContext: 用户的 session 内容,腾讯 server 回包中会原样返回。
|
81
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
82
|
+
# @type SessionContext: String
|
83
|
+
|
84
|
+
attr_accessor :CallId, :SessionContext
|
85
|
+
|
86
|
+
def initialize(callid=nil, sessioncontext=nil)
|
87
|
+
@CallId = callid
|
88
|
+
@SessionContext = sessioncontext
|
89
|
+
end
|
90
|
+
|
91
|
+
def deserialize(params)
|
92
|
+
@CallId = params['CallId']
|
93
|
+
@SessionContext = params['SessionContext']
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# SendTtsVoice请求参数结构体
|
98
|
+
class SendTtsVoiceRequest < TencentCloud::Common::AbstractModel
|
99
|
+
# @param TemplateId: 模板 ID,在控制台审核通过的模板 ID。
|
100
|
+
# @type TemplateId: String
|
101
|
+
# @param CalledNumber: 被叫手机号码,采用 e.164 标准,格式为+[国家或地区码][用户号码]。
|
102
|
+
# 例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。
|
103
|
+
# @type CalledNumber: String
|
104
|
+
# @param VoiceSdkAppid: 在[语音控制台](https://console.cloud.tencent.com/vms)添加应用后生成的实际SdkAppid,示例如1400006666。
|
105
|
+
# @type VoiceSdkAppid: String
|
106
|
+
# @param TemplateParamSet: 模板参数,若模板没有参数,请提供为空数组。
|
107
|
+
# 注:语音消息的内容长度不超过350字。
|
108
|
+
# @type TemplateParamSet: Array
|
109
|
+
# @param PlayTimes: 播放次数,可选,最多3次,默认2次。
|
110
|
+
# @type PlayTimes: Integer
|
111
|
+
# @param SessionContext: 用户的 session 内容,腾讯 server 回包中会原样返回。
|
112
|
+
# @type SessionContext: String
|
113
|
+
|
114
|
+
attr_accessor :TemplateId, :CalledNumber, :VoiceSdkAppid, :TemplateParamSet, :PlayTimes, :SessionContext
|
115
|
+
|
116
|
+
def initialize(templateid=nil, callednumber=nil, voicesdkappid=nil, templateparamset=nil, playtimes=nil, sessioncontext=nil)
|
117
|
+
@TemplateId = templateid
|
118
|
+
@CalledNumber = callednumber
|
119
|
+
@VoiceSdkAppid = voicesdkappid
|
120
|
+
@TemplateParamSet = templateparamset
|
121
|
+
@PlayTimes = playtimes
|
122
|
+
@SessionContext = sessioncontext
|
123
|
+
end
|
124
|
+
|
125
|
+
def deserialize(params)
|
126
|
+
@TemplateId = params['TemplateId']
|
127
|
+
@CalledNumber = params['CalledNumber']
|
128
|
+
@VoiceSdkAppid = params['VoiceSdkAppid']
|
129
|
+
@TemplateParamSet = params['TemplateParamSet']
|
130
|
+
@PlayTimes = params['PlayTimes']
|
131
|
+
@SessionContext = params['SessionContext']
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# SendTtsVoice返回参数结构体
|
136
|
+
class SendTtsVoiceResponse < TencentCloud::Common::AbstractModel
|
137
|
+
# @param SendStatus: 语音通知发送状态。
|
138
|
+
# @type SendStatus: :class:`Tencentcloud::Vms.v20200902.models.SendStatus`
|
139
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
140
|
+
# @type RequestId: String
|
141
|
+
|
142
|
+
attr_accessor :SendStatus, :RequestId
|
143
|
+
|
144
|
+
def initialize(sendstatus=nil, requestid=nil)
|
145
|
+
@SendStatus = sendstatus
|
146
|
+
@RequestId = requestid
|
147
|
+
end
|
148
|
+
|
149
|
+
def deserialize(params)
|
150
|
+
unless params['SendStatus'].nil?
|
151
|
+
@SendStatus = SendStatus.new
|
152
|
+
@SendStatus.deserialize(params['SendStatus'])
|
153
|
+
end
|
154
|
+
@RequestId = params['RequestId']
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-vms
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.200
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tencent Cloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-11-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: tencentcloud-sdk-common
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
description: Tencent Cloud Ruby SDK is the official software development kit, which
|
28
|
+
allows Ruby developers to write software that makes use of Tencent Cloud service
|
29
|
+
VMS.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/VERSION
|
37
|
+
- lib/tencentcloud-sdk-vms.rb
|
38
|
+
- lib/v20200902/client.rb
|
39
|
+
- lib/v20200902/models.rb
|
40
|
+
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
41
|
+
licenses:
|
42
|
+
- Apache-2.0
|
43
|
+
metadata:
|
44
|
+
source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-vms
|
45
|
+
changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 2.6.14
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Tencent Cloud SDK for Ruby - VMS
|
66
|
+
test_files: []
|