tencentcloud-sdk-lp 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: 6da339b9a3e2c92b8f9205ca621c2fee5747c09f
4
+ data.tar.gz: 8cf9d81817ee5669f4cb4766e23abf54e77f8f26
5
+ SHA512:
6
+ metadata.gz: 14ddf8b6d23505303d3714fbd00a27988756dcbcf5afdaece399fb9c92b04e6022d25537769713b5567c781a2e7fbdda70bbf2e90e5f6165a44570937238982e
7
+ data.tar.gz: 69bf89d68eaa7256d1ebda88a929e51749f21c590971b7c5529ea967262eb12db64ef43efc35a7a4808c5e1bc435f0a652b4a542c8207a2f5aa46f15f7f64818
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 Lp
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 Lp
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 = 'lp.tencentcloudapi.com'
27
+ sdk_version = 'LP_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 登录保护服务(LoginProtection,LP)针对网站和 APP 的用户登录场景,实时检测是否存在盗号、撞库等恶意登录行为,帮助开发者发现异常登录,降低恶意用户登录给业务带来的风险。
33
+
34
+ # @param request: Request instance for QueryLoginProtection.
35
+ # @type request: :class:`Tencentcloud::lp::V20200224::QueryLoginProtectionRequest`
36
+ # @rtype: :class:`Tencentcloud::lp::V20200224::QueryLoginProtectionResponse`
37
+ def QueryLoginProtection(request)
38
+ body = send_request('QueryLoginProtection', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = QueryLoginProtectionResponse.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,255 @@
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 Lp
19
+ module V20200224
20
+ # QueryLoginProtection请求参数结构体
21
+ class QueryLoginProtectionRequest < TencentCloud::Common::AbstractModel
22
+ # @param LoginIp: 登录来源的外网 IP。
23
+ # @type LoginIp: String
24
+ # @param Uid: 用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。
25
+ # @type Uid: String
26
+ # @param LoginTime: 登录时间戳,单位:秒。
27
+ # @type LoginTime: 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 RegisterTime: 注册来源的外网 IP。
46
+ # @type RegisterTime: String
47
+ # @param Address: 地址。
48
+ # @type Address: String
49
+ # @param CookieHash: 用户 HTTP 请求中的 cookie 进行2次 hash 的值,只要保证相同 cookie 的 hash 值一致即可。
50
+ # @type CookieHash: String
51
+ # @param LoginSource: 登录来源:
52
+ # 0:其他
53
+ # 1:PC 网页
54
+ # 2:移动页面
55
+ # 3:App
56
+ # 4:微信公众号
57
+ # @type LoginSource: String
58
+ # @param LoginType: 登录方式:
59
+ # 0:其他
60
+ # 1:手动帐号密码输入
61
+ # 2:动态短信密码登录
62
+ # 3:二维码扫描登录
63
+ # @type LoginType: String
64
+ # @param Referer: 用户 HTTP 请求的 referer 值。
65
+ # @type Referer: String
66
+ # @param JumpUrl: 登录成功后跳转页面。
67
+ # @type JumpUrl: String
68
+ # @param UserAgent: 用户 HTTP 请求的 userAgent。
69
+ # @type UserAgent: String
70
+ # @param XForwardedFor: 用户 HTTP 请求中的 x_forward_for。
71
+ # @type XForwardedFor: String
72
+ # @param MouseClickCount: 用户操作过程中鼠标单击次数。
73
+ # @type MouseClickCount: String
74
+ # @param KeyboardClickCount: 用户操作过程中键盘单击次数。
75
+ # @type KeyboardClickCount: String
76
+ # @param Result: 注册结果:
77
+ # 0:失败
78
+ # 1:成功
79
+ # @type Result: String
80
+ # @param Reason: 失败原因:
81
+ # 0:其他
82
+ # 1:参数错误
83
+ # 2:帐号冲突
84
+ # 3:验证错误
85
+ # @type Reason: String
86
+ # @param LoginSpend: 登录耗时,单位:秒。
87
+ # @type LoginSpend: String
88
+ # @param MacAddress: MAC 地址或设备唯一标识。
89
+ # @type MacAddress: String
90
+ # @param VendorId: 手机制造商 ID,如果手机注册,请带上此信息。
91
+ # @type VendorId: String
92
+ # @param AppVersion: App 客户端版本。
93
+ # @type AppVersion: String
94
+ # @param Imei: 手机设备号。
95
+ # @type Imei: String
96
+ # @param BusinessId: 业务 ID 网站或应用在多个业务中使用此服务,通过此 ID 区分统计数据。
97
+ # @type BusinessId: String
98
+ # @param WxSubType: 1:微信公众号
99
+ # 2:微信小程序
100
+ # @type WxSubType: String
101
+ # @param RandNum: Token 签名随机数,微信小程序必填,建议16个字符。
102
+ # @type RandNum: String
103
+ # @param WxToken: 如果是微信小程序,该字段为以 ssesion_key 为 key 去签名随机数radnNum得到的值(hmac_sha256 签名算法)。
104
+ # 如果是微信公众号或第三方登录,则为授权的 access_token(注意:不是普通 access_token,具体看 微信官方文档)。
105
+ # @type WxToken: String
106
+
107
+ attr_accessor :LoginIp, :Uid, :LoginTime, :AccountType, :AppIdU, :AssociateAccount, :NickName, :PhoneNumber, :EmailAddress, :RegisterTime, :Address, :CookieHash, :LoginSource, :LoginType, :Referer, :JumpUrl, :UserAgent, :XForwardedFor, :MouseClickCount, :KeyboardClickCount, :Result, :Reason, :LoginSpend, :MacAddress, :VendorId, :AppVersion, :Imei, :BusinessId, :WxSubType, :RandNum, :WxToken
108
+
109
+ def initialize(loginip=nil, uid=nil, logintime=nil, accounttype=nil, appidu=nil, associateaccount=nil, nickname=nil, phonenumber=nil, emailaddress=nil, registertime=nil, address=nil, cookiehash=nil, loginsource=nil, logintype=nil, referer=nil, jumpurl=nil, useragent=nil, xforwardedfor=nil, mouseclickcount=nil, keyboardclickcount=nil, result=nil, reason=nil, loginspend=nil, macaddress=nil, vendorid=nil, appversion=nil, imei=nil, businessid=nil, wxsubtype=nil, randnum=nil, wxtoken=nil)
110
+ @LoginIp = loginip
111
+ @Uid = uid
112
+ @LoginTime = logintime
113
+ @AccountType = accounttype
114
+ @AppIdU = appidu
115
+ @AssociateAccount = associateaccount
116
+ @NickName = nickname
117
+ @PhoneNumber = phonenumber
118
+ @EmailAddress = emailaddress
119
+ @RegisterTime = registertime
120
+ @Address = address
121
+ @CookieHash = cookiehash
122
+ @LoginSource = loginsource
123
+ @LoginType = logintype
124
+ @Referer = referer
125
+ @JumpUrl = jumpurl
126
+ @UserAgent = useragent
127
+ @XForwardedFor = xforwardedfor
128
+ @MouseClickCount = mouseclickcount
129
+ @KeyboardClickCount = keyboardclickcount
130
+ @Result = result
131
+ @Reason = reason
132
+ @LoginSpend = loginspend
133
+ @MacAddress = macaddress
134
+ @VendorId = vendorid
135
+ @AppVersion = appversion
136
+ @Imei = imei
137
+ @BusinessId = businessid
138
+ @WxSubType = wxsubtype
139
+ @RandNum = randnum
140
+ @WxToken = wxtoken
141
+ end
142
+
143
+ def deserialize(params)
144
+ @LoginIp = params['LoginIp']
145
+ @Uid = params['Uid']
146
+ @LoginTime = params['LoginTime']
147
+ @AccountType = params['AccountType']
148
+ @AppIdU = params['AppIdU']
149
+ @AssociateAccount = params['AssociateAccount']
150
+ @NickName = params['NickName']
151
+ @PhoneNumber = params['PhoneNumber']
152
+ @EmailAddress = params['EmailAddress']
153
+ @RegisterTime = params['RegisterTime']
154
+ @Address = params['Address']
155
+ @CookieHash = params['CookieHash']
156
+ @LoginSource = params['LoginSource']
157
+ @LoginType = params['LoginType']
158
+ @Referer = params['Referer']
159
+ @JumpUrl = params['JumpUrl']
160
+ @UserAgent = params['UserAgent']
161
+ @XForwardedFor = params['XForwardedFor']
162
+ @MouseClickCount = params['MouseClickCount']
163
+ @KeyboardClickCount = params['KeyboardClickCount']
164
+ @Result = params['Result']
165
+ @Reason = params['Reason']
166
+ @LoginSpend = params['LoginSpend']
167
+ @MacAddress = params['MacAddress']
168
+ @VendorId = params['VendorId']
169
+ @AppVersion = params['AppVersion']
170
+ @Imei = params['Imei']
171
+ @BusinessId = params['BusinessId']
172
+ @WxSubType = params['WxSubType']
173
+ @RandNum = params['RandNum']
174
+ @WxToken = params['WxToken']
175
+ end
176
+ end
177
+
178
+ # QueryLoginProtection返回参数结构体
179
+ class QueryLoginProtectionResponse < TencentCloud::Common::AbstractModel
180
+ # @param CodeDesc: AssociateAccount
181
+
182
+ # accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。
183
+ # LoginTime
184
+
185
+ # 操作时间。
186
+ # Uid
187
+
188
+ # 用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。
189
+ # LoginIp
190
+
191
+ # 登录 IP。
192
+ # Level
193
+
194
+ # 0:表示无恶意。
195
+ # 1 - 4:恶意等级由低到高。
196
+ # RiskType
197
+
198
+ # 风险类型。
199
+ # 出参不用填"Req业务侧错误码。成功时返回 Success,错误时返回具体业务错误原因。uestId"等公共出参, 详细解释>>>
200
+ # 注意:此字段可能返回 null,表示取不到有效值。
201
+ # @type CodeDesc: String
202
+ # @param AssociateAccount: accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。
203
+ # 注意:此字段可能返回 null,表示取不到有效值。
204
+ # @type AssociateAccount: String
205
+ # @param LoginTime: 操作时间。
206
+ # 注意:此字段可能返回 null,表示取不到有效值。
207
+ # @type LoginTime: String
208
+ # @param Uid: 用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。
209
+ # 注意:此字段可能返回 null,表示取不到有效值。
210
+ # @type Uid: String
211
+ # @param LoginIp: 登录 IP。
212
+ # 注意:此字段可能返回 null,表示取不到有效值。
213
+ # @type LoginIp: String
214
+ # @param Level: 0:表示无恶意。
215
+ # 1 - 4:恶意等级由低到高。
216
+ # @type Level: Integer
217
+ # @param RiskType: 风险类型。
218
+ # @type RiskType: Array
219
+ # @param RootId: accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。
220
+ # 注意:此字段可能返回 null,表示取不到有效值。
221
+ # @type RootId: String
222
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
223
+ # @type RequestId: String
224
+
225
+ attr_accessor :CodeDesc, :AssociateAccount, :LoginTime, :Uid, :LoginIp, :Level, :RiskType, :RootId, :RequestId
226
+
227
+ def initialize(codedesc=nil, associateaccount=nil, logintime=nil, uid=nil, loginip=nil, level=nil, risktype=nil, rootid=nil, requestid=nil)
228
+ @CodeDesc = codedesc
229
+ @AssociateAccount = associateaccount
230
+ @LoginTime = logintime
231
+ @Uid = uid
232
+ @LoginIp = loginip
233
+ @Level = level
234
+ @RiskType = risktype
235
+ @RootId = rootid
236
+ @RequestId = requestid
237
+ end
238
+
239
+ def deserialize(params)
240
+ @CodeDesc = params['CodeDesc']
241
+ @AssociateAccount = params['AssociateAccount']
242
+ @LoginTime = params['LoginTime']
243
+ @Uid = params['Uid']
244
+ @LoginIp = params['LoginIp']
245
+ @Level = params['Level']
246
+ @RiskType = params['RiskType']
247
+ @RootId = params['RootId']
248
+ @RequestId = params['RequestId']
249
+ end
250
+ end
251
+
252
+ end
253
+ end
254
+ end
255
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-lp
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
+ LP.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-lp.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-lp
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 - LP
66
+ test_files: []