tencentcloud-sdk-rp 1.0.200

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8fa5031b6f02e8c93da137cf8dfb1b896876563a
4
+ data.tar.gz: 69676b2ee7b6390d729b5817c5a88316b1ed5759
5
+ SHA512:
6
+ metadata.gz: b80265dd6b36d180d78b2e4c2cdb8208907d196d11c64cb985e0b84c1fae9a6e0e74e9a8bdd9dc43b0f62ecdc1cf9809d3aa3659770c773986f75ee6aafc6c77
7
+ data.tar.gz: 791d1529f7de3fe0ef4e9855d63721f8f712e8352f3a6e9b040752c5fa8fcda4cec7578542ace405d165a083f397fba8ad5a5cde8f22ce7c96754cac57281a63
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20200224/client'
6
+ require_relative 'v20200224/models'
7
+
8
+ module TencentCloud
9
+ module Rp
10
+ end
11
+ end
@@ -0,0 +1,60 @@
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 Rp
21
+ module V20200224
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2020-02-24'
26
+ api_endpoint = 'rp.tencentcloudapi.com'
27
+ sdk_version = 'RP_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 注册保护服务(RegisterProtection,RP)针对网站、APP 的线上注册场景,遇到 “恶意注册” 、“小号注册” 、“注册器注册” 等恶意行为,提供基于天御 DNA 算法的恶意防护引擎,从账号、设备、行为三个维度有效识别 “恶意注册”,从“源头”上防范业务风险。
33
+
34
+ # @param request: Request instance for QueryRegisterProtection.
35
+ # @type request: :class:`Tencentcloud::rp::V20200224::QueryRegisterProtectionRequest`
36
+ # @rtype: :class:`Tencentcloud::rp::V20200224::QueryRegisterProtectionResponse`
37
+ def QueryRegisterProtection(request)
38
+ body = send_request('QueryRegisterProtection', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = QueryRegisterProtectionResponse.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
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,219 @@
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 Rp
19
+ module V20200224
20
+ # QueryRegisterProtection请求参数结构体
21
+ class QueryRegisterProtectionRequest < TencentCloud::Common::AbstractModel
22
+ # @param RegisterIp: 注册来源的外网 IP。
23
+ # @type RegisterIp: String
24
+ # @param Uid: 用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。
25
+ # @type Uid: String
26
+ # @param RegisterTime: 注册时间戳,单位:秒。
27
+ # @type RegisterTime: String
28
+ # @param AccountType: 用户账号类型(QQ 开放帐号、微信开放账号需要 提交工单 由腾讯云进行资格审核):
29
+ # 1:QQ 开放帐号。
30
+ # 2:微信开放账号。
31
+ # 4:手机号。
32
+ # 0:其他。
33
+ # 10004:手机号 MD5。
34
+ # @type AccountType: String
35
+ # @param AppIdU: accountType 是 QQ 或微信开放账号时,该参数必填,表示 QQ 或微信分配给网站或应用的 AppID,用来唯一标识网站或应用。
36
+ # @type AppIdU: String
37
+ # @param AssociateAccount: accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。
38
+ # @type AssociateAccount: String
39
+ # @param NickName: 昵称,UTF-8 编码。
40
+ # @type NickName: String
41
+ # @param PhoneNumber: 手机号:国家代码-手机号, 如0086-15912345687(0086前不需要+号)。
42
+ # @type PhoneNumber: String
43
+ # @param EmailAddress: 用户邮箱地址(非系统自动生成)。
44
+ # @type EmailAddress: String
45
+ # @param Address: 地址。
46
+ # @type Address: String
47
+ # @param CookieHash: 用户 HTTP 请求中的 cookie 进行2次 hash 的值,只要保证相同 cookie 的 hash 值一致即可。
48
+ # @type CookieHash: String
49
+ # @param RegisterSource: 注册来源:
50
+ # 0:其他。
51
+ # 1:PC 网页。
52
+ # 2:移动页面。
53
+ # 3:App。
54
+ # 4:微信公众号。
55
+ # @type RegisterSource: String
56
+ # @param Referer: 用户 HTTP 请求的 referer 值。
57
+ # @type Referer: String
58
+ # @param JumpUrl: 注册成功后跳转页面。
59
+ # @type JumpUrl: String
60
+ # @param UserAgent: 用户 HTTP 请求的 userAgent。
61
+ # @type UserAgent: String
62
+ # @param XForwardedFor: 用户 HTTP 请求中的 x_forward_for。
63
+ # @type XForwardedFor: String
64
+ # @param MouseClickCount: 用户操作过程中鼠标单击次数。
65
+ # @type MouseClickCount: String
66
+ # @param KeyboardClickCount: 用户操作过程中键盘单击次数。
67
+ # @type KeyboardClickCount: String
68
+ # @param Result: 注册结果:
69
+ # 0:失败。
70
+ # 1:成功。
71
+ # @type Result: String
72
+ # @param Reason: 失败原因:
73
+ # 0:其他。
74
+ # 1:参数错误。
75
+ # 2:帐号冲突。
76
+ # 3:验证错误。
77
+ # @type Reason: String
78
+ # @param RegisterSpend: 登录耗时,单位:秒。
79
+ # @type RegisterSpend: String
80
+ # @param MacAddress: MAC 地址或设备唯一标识。
81
+ # @type MacAddress: String
82
+ # @param VendorId: 手机制造商 ID,如果手机注册,请带上此信息。
83
+ # @type VendorId: String
84
+ # @param AppVersion: App 客户端版本。
85
+ # @type AppVersion: String
86
+ # @param Imei: 手机设备号。
87
+ # @type Imei: String
88
+ # @param BusinessId: 业务 ID 网站或应用在多个业务中使用此服务,通过此 ID 区分统计数据。
89
+ # @type BusinessId: String
90
+ # @param WxSubType: 1:微信公众号。
91
+ # 2:微信小程序。
92
+ # @type WxSubType: String
93
+ # @param RandNum: Token 签名随机数,微信小程序必填,建议16个字符。
94
+ # @type RandNum: String
95
+ # @param WxToken: 如果是微信小程序,该字段为以 ssesion_key 为 key 去签名随机数 radnNum 得到的值(hmac_sha256签名算法)。
96
+ # 如果是微信公众号或第三方登录,则为授权的 access_token(注意:不是普通 access_token,具体看 微信官方文档)。
97
+ # @type WxToken: String
98
+
99
+ attr_accessor :RegisterIp, :Uid, :RegisterTime, :AccountType, :AppIdU, :AssociateAccount, :NickName, :PhoneNumber, :EmailAddress, :Address, :CookieHash, :RegisterSource, :Referer, :JumpUrl, :UserAgent, :XForwardedFor, :MouseClickCount, :KeyboardClickCount, :Result, :Reason, :RegisterSpend, :MacAddress, :VendorId, :AppVersion, :Imei, :BusinessId, :WxSubType, :RandNum, :WxToken
100
+
101
+ def initialize(registerip=nil, uid=nil, registertime=nil, accounttype=nil, appidu=nil, associateaccount=nil, nickname=nil, phonenumber=nil, emailaddress=nil, address=nil, cookiehash=nil, registersource=nil, referer=nil, jumpurl=nil, useragent=nil, xforwardedfor=nil, mouseclickcount=nil, keyboardclickcount=nil, result=nil, reason=nil, registerspend=nil, macaddress=nil, vendorid=nil, appversion=nil, imei=nil, businessid=nil, wxsubtype=nil, randnum=nil, wxtoken=nil)
102
+ @RegisterIp = registerip
103
+ @Uid = uid
104
+ @RegisterTime = registertime
105
+ @AccountType = accounttype
106
+ @AppIdU = appidu
107
+ @AssociateAccount = associateaccount
108
+ @NickName = nickname
109
+ @PhoneNumber = phonenumber
110
+ @EmailAddress = emailaddress
111
+ @Address = address
112
+ @CookieHash = cookiehash
113
+ @RegisterSource = registersource
114
+ @Referer = referer
115
+ @JumpUrl = jumpurl
116
+ @UserAgent = useragent
117
+ @XForwardedFor = xforwardedfor
118
+ @MouseClickCount = mouseclickcount
119
+ @KeyboardClickCount = keyboardclickcount
120
+ @Result = result
121
+ @Reason = reason
122
+ @RegisterSpend = registerspend
123
+ @MacAddress = macaddress
124
+ @VendorId = vendorid
125
+ @AppVersion = appversion
126
+ @Imei = imei
127
+ @BusinessId = businessid
128
+ @WxSubType = wxsubtype
129
+ @RandNum = randnum
130
+ @WxToken = wxtoken
131
+ end
132
+
133
+ def deserialize(params)
134
+ @RegisterIp = params['RegisterIp']
135
+ @Uid = params['Uid']
136
+ @RegisterTime = params['RegisterTime']
137
+ @AccountType = params['AccountType']
138
+ @AppIdU = params['AppIdU']
139
+ @AssociateAccount = params['AssociateAccount']
140
+ @NickName = params['NickName']
141
+ @PhoneNumber = params['PhoneNumber']
142
+ @EmailAddress = params['EmailAddress']
143
+ @Address = params['Address']
144
+ @CookieHash = params['CookieHash']
145
+ @RegisterSource = params['RegisterSource']
146
+ @Referer = params['Referer']
147
+ @JumpUrl = params['JumpUrl']
148
+ @UserAgent = params['UserAgent']
149
+ @XForwardedFor = params['XForwardedFor']
150
+ @MouseClickCount = params['MouseClickCount']
151
+ @KeyboardClickCount = params['KeyboardClickCount']
152
+ @Result = params['Result']
153
+ @Reason = params['Reason']
154
+ @RegisterSpend = params['RegisterSpend']
155
+ @MacAddress = params['MacAddress']
156
+ @VendorId = params['VendorId']
157
+ @AppVersion = params['AppVersion']
158
+ @Imei = params['Imei']
159
+ @BusinessId = params['BusinessId']
160
+ @WxSubType = params['WxSubType']
161
+ @RandNum = params['RandNum']
162
+ @WxToken = params['WxToken']
163
+ end
164
+ end
165
+
166
+ # QueryRegisterProtection返回参数结构体
167
+ class QueryRegisterProtectionResponse < TencentCloud::Common::AbstractModel
168
+ # @param CodeDesc: 业务侧错误码,成功时返回 Success,错误时返回具体业务错误原因。
169
+ # 注意:此字段可能返回 null,表示取不到有效值。
170
+ # @type CodeDesc: String
171
+ # @param AssociateAccount: accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。
172
+ # 注意:此字段可能返回 null,表示取不到有效值。
173
+ # @type AssociateAccount: String
174
+ # @param RegisterTime: 注册时间戳,单位:秒。
175
+ # 注意:此字段可能返回 null,表示取不到有效值。
176
+ # @type RegisterTime: String
177
+ # @param Uid: 用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。
178
+ # 注意:此字段可能返回 null,表示取不到有效值。
179
+ # @type Uid: String
180
+ # @param RegisterIp: 注册来源的外网 IP。
181
+ # 注意:此字段可能返回 null,表示取不到有效值。
182
+ # @type RegisterIp: String
183
+ # @param Level: 0:表示无恶意。
184
+ # 1 - 4:恶意等级由低到高。
185
+ # @type Level: Integer
186
+ # @param RiskType: 风险类型。
187
+ # @type RiskType: Array
188
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
189
+ # @type RequestId: String
190
+
191
+ attr_accessor :CodeDesc, :AssociateAccount, :RegisterTime, :Uid, :RegisterIp, :Level, :RiskType, :RequestId
192
+
193
+ def initialize(codedesc=nil, associateaccount=nil, registertime=nil, uid=nil, registerip=nil, level=nil, risktype=nil, requestid=nil)
194
+ @CodeDesc = codedesc
195
+ @AssociateAccount = associateaccount
196
+ @RegisterTime = registertime
197
+ @Uid = uid
198
+ @RegisterIp = registerip
199
+ @Level = level
200
+ @RiskType = risktype
201
+ @RequestId = requestid
202
+ end
203
+
204
+ def deserialize(params)
205
+ @CodeDesc = params['CodeDesc']
206
+ @AssociateAccount = params['AssociateAccount']
207
+ @RegisterTime = params['RegisterTime']
208
+ @Uid = params['Uid']
209
+ @RegisterIp = params['RegisterIp']
210
+ @Level = params['Level']
211
+ @RiskType = params['RiskType']
212
+ @RequestId = params['RequestId']
213
+ end
214
+ end
215
+
216
+ end
217
+ end
218
+ end
219
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-rp
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
+ RP.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-rp.rb
38
+ - lib/v20200224/client.rb
39
+ - lib/v20200224/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-rp
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 - RP
66
+ test_files: []