tencentcloud-sdk-rkp 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9a22e0e11c9a6b466080f427e6923b3d786ca787
4
+ data.tar.gz: d88a8d8d81b68295cbc70b449521e82cf2a78ea7
5
+ SHA512:
6
+ metadata.gz: 35a307f91ebf8a042ad4c6c8143357077f08bba259e52ef326f99699a59029589e74ead2b2ee5cf7a44a70e5c29be6ced566306451020eda9e68d6ce0f958f98
7
+ data.tar.gz: 5ae5d1751005a4a9dbd3cb967d4c88bc1dcaa885b2bac28bdb98270b06df4ef5291d09312d1d182d14860c8aeac9f6fe12f0d6ce1cf5ea39772b5c70c00cadff
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 'v20191209/client'
6
+ require_relative 'v20191209/models'
7
+
8
+ module TencentCloud
9
+ module Rkp
10
+ end
11
+ end
@@ -0,0 +1,108 @@
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 Rkp
21
+ module V20191209
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-12-09'
26
+ api_endpoint = 'rkp.tencentcloudapi.com'
27
+ sdk_version = 'RKP_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 根据DevicceToken查询OpenID。
33
+
34
+ # @param request: Request instance for GetOpenId.
35
+ # @type request: :class:`Tencentcloud::rkp::V20191209::GetOpenIdRequest`
36
+ # @rtype: :class:`Tencentcloud::rkp::V20191209::GetOpenIdResponse`
37
+ def GetOpenId(request)
38
+ body = send_request('GetOpenId', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = GetOpenIdResponse.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
+ # 获取token接口。
57
+
58
+ # @param request: Request instance for GetToken.
59
+ # @type request: :class:`Tencentcloud::rkp::V20191209::GetTokenRequest`
60
+ # @rtype: :class:`Tencentcloud::rkp::V20191209::GetTokenResponse`
61
+ def GetToken(request)
62
+ body = send_request('GetToken', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = GetTokenResponse.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
+ # 腾讯天御设备风险查询接口,输入由客户应用自主采集的设备信息, 通过腾讯大数据风控能力,可以准确根据输入设备信息,还原设备库中的设备ID,并且识别设备的风险,解决客户业务过程中的设备风险,降低企业损失。
81
+
82
+ # @param request: Request instance for QueryDevAndRisk.
83
+ # @type request: :class:`Tencentcloud::rkp::V20191209::QueryDevAndRiskRequest`
84
+ # @rtype: :class:`Tencentcloud::rkp::V20191209::QueryDevAndRiskResponse`
85
+ def QueryDevAndRisk(request)
86
+ body = send_request('QueryDevAndRisk', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = QueryDevAndRiskResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,371 @@
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 Rkp
19
+ module V20191209
20
+ # 设备信息
21
+ class DevInfoQ < TencentCloud::Common::AbstractModel
22
+ # @param OpenId: devid
23
+ # @type OpenId: String
24
+ # @param RiskScore: 风险值
25
+ # @type RiskScore: Integer
26
+ # @param RiskInfo: 风险详情
27
+ # 注意:此字段可能返回 null,表示取不到有效值。
28
+ # @type RiskInfo: Array
29
+ # @param Probability: 概率值
30
+ # @type Probability: Float
31
+
32
+ attr_accessor :OpenId, :RiskScore, :RiskInfo, :Probability
33
+
34
+ def initialize(openid=nil, riskscore=nil, riskinfo=nil, probability=nil)
35
+ @OpenId = openid
36
+ @RiskScore = riskscore
37
+ @RiskInfo = riskinfo
38
+ @Probability = probability
39
+ end
40
+
41
+ def deserialize(params)
42
+ @OpenId = params['OpenId']
43
+ @RiskScore = params['RiskScore']
44
+ unless params['RiskInfo'].nil?
45
+ @RiskInfo = []
46
+ params['RiskInfo'].each do |i|
47
+ riskdetail_tmp = RiskDetail.new
48
+ riskdetail_tmp.deserialize(i)
49
+ @RiskInfo << riskdetail_tmp
50
+ end
51
+ end
52
+ @Probability = params['Probability']
53
+ end
54
+ end
55
+
56
+ # GetOpenId请求参数结构体
57
+ class GetOpenIdRequest < TencentCloud::Common::AbstractModel
58
+ # @param DeviceToken: dev临时token,通过sdk接口获取
59
+ # @type DeviceToken: String
60
+ # @param BusinessId: 业务ID
61
+ # @type BusinessId: Integer
62
+ # @param BusinessUserId: 业务侧账号体系下的用户ID
63
+ # @type BusinessUserId: String
64
+ # @param Platform: 平台:0-Android, 1-iOS, 2-web
65
+ # @type Platform: Integer
66
+ # @param Option: 选项
67
+ # @type Option: String
68
+
69
+ attr_accessor :DeviceToken, :BusinessId, :BusinessUserId, :Platform, :Option
70
+
71
+ def initialize(devicetoken=nil, businessid=nil, businessuserid=nil, platform=nil, option=nil)
72
+ @DeviceToken = devicetoken
73
+ @BusinessId = businessid
74
+ @BusinessUserId = businessuserid
75
+ @Platform = platform
76
+ @Option = option
77
+ end
78
+
79
+ def deserialize(params)
80
+ @DeviceToken = params['DeviceToken']
81
+ @BusinessId = params['BusinessId']
82
+ @BusinessUserId = params['BusinessUserId']
83
+ @Platform = params['Platform']
84
+ @Option = params['Option']
85
+ end
86
+ end
87
+
88
+ # GetOpenId返回参数结构体
89
+ class GetOpenIdResponse < TencentCloud::Common::AbstractModel
90
+ # @param OpenId: 设备ID
91
+ # 注意:此字段可能返回 null,表示取不到有效值。
92
+ # @type OpenId: String
93
+ # @param RiskInfo: 设备风险
94
+ # 注意:此字段可能返回 null,表示取不到有效值。
95
+ # @type RiskInfo: Array
96
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
97
+ # @type RequestId: String
98
+
99
+ attr_accessor :OpenId, :RiskInfo, :RequestId
100
+
101
+ def initialize(openid=nil, riskinfo=nil, requestid=nil)
102
+ @OpenId = openid
103
+ @RiskInfo = riskinfo
104
+ @RequestId = requestid
105
+ end
106
+
107
+ def deserialize(params)
108
+ @OpenId = params['OpenId']
109
+ unless params['RiskInfo'].nil?
110
+ @RiskInfo = []
111
+ params['RiskInfo'].each do |i|
112
+ riskinfo_tmp = RiskInfo.new
113
+ riskinfo_tmp.deserialize(i)
114
+ @RiskInfo << riskinfo_tmp
115
+ end
116
+ end
117
+ @RequestId = params['RequestId']
118
+ end
119
+ end
120
+
121
+ # GetToken请求参数结构体
122
+ class GetTokenRequest < TencentCloud::Common::AbstractModel
123
+ # @param BusinessId: 业务ID
124
+ # @type BusinessId: Integer
125
+ # @param Scene: 业务子场景
126
+ # @type Scene: Integer
127
+ # @param BusinessUserId: 业务侧账号体系下的用户ID
128
+ # @type BusinessUserId: String
129
+ # @param AppClientIp: 用户侧的IP
130
+ # @type AppClientIp: String
131
+ # @param ExpireTime: 过期时间
132
+ # @type ExpireTime: Integer
133
+ # @param OldToken: 上一个token
134
+ # @type OldToken: String
135
+
136
+ attr_accessor :BusinessId, :Scene, :BusinessUserId, :AppClientIp, :ExpireTime, :OldToken
137
+
138
+ def initialize(businessid=nil, scene=nil, businessuserid=nil, appclientip=nil, expiretime=nil, oldtoken=nil)
139
+ @BusinessId = businessid
140
+ @Scene = scene
141
+ @BusinessUserId = businessuserid
142
+ @AppClientIp = appclientip
143
+ @ExpireTime = expiretime
144
+ @OldToken = oldtoken
145
+ end
146
+
147
+ def deserialize(params)
148
+ @BusinessId = params['BusinessId']
149
+ @Scene = params['Scene']
150
+ @BusinessUserId = params['BusinessUserId']
151
+ @AppClientIp = params['AppClientIp']
152
+ @ExpireTime = params['ExpireTime']
153
+ @OldToken = params['OldToken']
154
+ end
155
+ end
156
+
157
+ # GetToken返回参数结构体
158
+ class GetTokenResponse < TencentCloud::Common::AbstractModel
159
+ # @param Token: 返回token
160
+ # @type Token: String
161
+ # @param ExpireTime: 过期时间
162
+ # @type ExpireTime: Integer
163
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
164
+ # @type RequestId: String
165
+
166
+ attr_accessor :Token, :ExpireTime, :RequestId
167
+
168
+ def initialize(token=nil, expiretime=nil, requestid=nil)
169
+ @Token = token
170
+ @ExpireTime = expiretime
171
+ @RequestId = requestid
172
+ end
173
+
174
+ def deserialize(params)
175
+ @Token = params['Token']
176
+ @ExpireTime = params['ExpireTime']
177
+ @RequestId = params['RequestId']
178
+ end
179
+ end
180
+
181
+ # QueryDevAndRisk请求参数结构体
182
+ class QueryDevAndRiskRequest < TencentCloud::Common::AbstractModel
183
+ # @param DevType: 设备类型 0表示Android, 1表示IOS
184
+ # @type DevType: Integer
185
+ # @param Imei: Android Imei号
186
+ # @type Imei: String
187
+ # @param Mac: Mac地址
188
+ # @type Mac: String
189
+ # @param Aid: android Aid
190
+ # @type Aid: String
191
+ # @param Cid: Android Cid
192
+ # @type Cid: String
193
+ # @param Imsi: 手机Imsi
194
+ # @type Imsi: String
195
+ # @param Df: Df 磁盘分区信息
196
+ # @type Df: String
197
+ # @param KernelVer: 内核版本
198
+ # @type KernelVer: String
199
+ # @param Storage: 存储大小
200
+ # @type Storage: String
201
+ # @param Dfp: 设备驱动指纹
202
+ # @type Dfp: String
203
+ # @param BootTime: 启动时间
204
+ # @type BootTime: String
205
+ # @param Resolution: 分辨率 水平*垂直 格式
206
+ # @type Resolution: String
207
+ # @param RingList: 铃声列表
208
+ # @type RingList: String
209
+ # @param FontList: 字体列表
210
+ # @type FontList: String
211
+ # @param SensorList: 传感器列表
212
+ # @type SensorList: String
213
+ # @param CpuType: CPU型号
214
+ # @type CpuType: String
215
+ # @param Battery: 电池容量
216
+ # @type Battery: String
217
+ # @param Oaid: 信通院广告ID
218
+ # @type Oaid: String
219
+ # @param Idfa: IOS 广告ID
220
+ # @type Idfa: String
221
+ # @param Idfv: IOS 应用ID
222
+ # @type Idfv: String
223
+ # @param DeviceName: 设备名称
224
+ # @type DeviceName: String
225
+ # @param IphoneModel: IOS手机型号
226
+ # @type IphoneModel: String
227
+ # @param Fingerprint: Android 指纹
228
+ # @type Fingerprint: String
229
+ # @param SerialId: Android序列号
230
+ # @type SerialId: String
231
+
232
+ attr_accessor :DevType, :Imei, :Mac, :Aid, :Cid, :Imsi, :Df, :KernelVer, :Storage, :Dfp, :BootTime, :Resolution, :RingList, :FontList, :SensorList, :CpuType, :Battery, :Oaid, :Idfa, :Idfv, :DeviceName, :IphoneModel, :Fingerprint, :SerialId
233
+
234
+ def initialize(devtype=nil, imei=nil, mac=nil, aid=nil, cid=nil, imsi=nil, df=nil, kernelver=nil, storage=nil, dfp=nil, boottime=nil, resolution=nil, ringlist=nil, fontlist=nil, sensorlist=nil, cputype=nil, battery=nil, oaid=nil, idfa=nil, idfv=nil, devicename=nil, iphonemodel=nil, fingerprint=nil, serialid=nil)
235
+ @DevType = devtype
236
+ @Imei = imei
237
+ @Mac = mac
238
+ @Aid = aid
239
+ @Cid = cid
240
+ @Imsi = imsi
241
+ @Df = df
242
+ @KernelVer = kernelver
243
+ @Storage = storage
244
+ @Dfp = dfp
245
+ @BootTime = boottime
246
+ @Resolution = resolution
247
+ @RingList = ringlist
248
+ @FontList = fontlist
249
+ @SensorList = sensorlist
250
+ @CpuType = cputype
251
+ @Battery = battery
252
+ @Oaid = oaid
253
+ @Idfa = idfa
254
+ @Idfv = idfv
255
+ @DeviceName = devicename
256
+ @IphoneModel = iphonemodel
257
+ @Fingerprint = fingerprint
258
+ @SerialId = serialid
259
+ end
260
+
261
+ def deserialize(params)
262
+ @DevType = params['DevType']
263
+ @Imei = params['Imei']
264
+ @Mac = params['Mac']
265
+ @Aid = params['Aid']
266
+ @Cid = params['Cid']
267
+ @Imsi = params['Imsi']
268
+ @Df = params['Df']
269
+ @KernelVer = params['KernelVer']
270
+ @Storage = params['Storage']
271
+ @Dfp = params['Dfp']
272
+ @BootTime = params['BootTime']
273
+ @Resolution = params['Resolution']
274
+ @RingList = params['RingList']
275
+ @FontList = params['FontList']
276
+ @SensorList = params['SensorList']
277
+ @CpuType = params['CpuType']
278
+ @Battery = params['Battery']
279
+ @Oaid = params['Oaid']
280
+ @Idfa = params['Idfa']
281
+ @Idfv = params['Idfv']
282
+ @DeviceName = params['DeviceName']
283
+ @IphoneModel = params['IphoneModel']
284
+ @Fingerprint = params['Fingerprint']
285
+ @SerialId = params['SerialId']
286
+ end
287
+ end
288
+
289
+ # QueryDevAndRisk返回参数结构体
290
+ class QueryDevAndRiskResponse < TencentCloud::Common::AbstractModel
291
+ # @param Found: 是否查得
292
+ # @type Found: Integer
293
+ # @param AllCnt: 匹配数量级别
294
+ # 注意:此字段可能返回 null,表示取不到有效值。
295
+ # @type AllCnt: Integer
296
+ # @param Matches: 匹配到的设备信息
297
+ # 注意:此字段可能返回 null,表示取不到有效值。
298
+ # @type Matches: Array
299
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
300
+ # @type RequestId: String
301
+
302
+ attr_accessor :Found, :AllCnt, :Matches, :RequestId
303
+
304
+ def initialize(found=nil, allcnt=nil, matches=nil, requestid=nil)
305
+ @Found = found
306
+ @AllCnt = allcnt
307
+ @Matches = matches
308
+ @RequestId = requestid
309
+ end
310
+
311
+ def deserialize(params)
312
+ @Found = params['Found']
313
+ @AllCnt = params['AllCnt']
314
+ unless params['Matches'].nil?
315
+ @Matches = []
316
+ params['Matches'].each do |i|
317
+ devinfoq_tmp = DevInfoQ.new
318
+ devinfoq_tmp.deserialize(i)
319
+ @Matches << devinfoq_tmp
320
+ end
321
+ end
322
+ @RequestId = params['RequestId']
323
+ end
324
+ end
325
+
326
+ # 风险详情
327
+ class RiskDetail < TencentCloud::Common::AbstractModel
328
+ # @param RiskCode: 风险码
329
+ # @type RiskCode: Integer
330
+ # @param RiskCodeValue: 风险详情
331
+ # 注意:此字段可能返回 null,表示取不到有效值。
332
+ # @type RiskCodeValue: String
333
+
334
+ attr_accessor :RiskCode, :RiskCodeValue
335
+
336
+ def initialize(riskcode=nil, riskcodevalue=nil)
337
+ @RiskCode = riskcode
338
+ @RiskCodeValue = riskcodevalue
339
+ end
340
+
341
+ def deserialize(params)
342
+ @RiskCode = params['RiskCode']
343
+ @RiskCodeValue = params['RiskCodeValue']
344
+ end
345
+ end
346
+
347
+ # 风险信息
348
+ class RiskInfo < TencentCloud::Common::AbstractModel
349
+ # @param Key: 风险码
350
+ # @type Key: Integer
351
+ # @param Value: 风险详情
352
+ # 注意:此字段可能返回 null,表示取不到有效值。
353
+ # @type Value: String
354
+
355
+ attr_accessor :Key, :Value
356
+
357
+ def initialize(key=nil, value=nil)
358
+ @Key = key
359
+ @Value = value
360
+ end
361
+
362
+ def deserialize(params)
363
+ @Key = params['Key']
364
+ @Value = params['Value']
365
+ end
366
+ end
367
+
368
+ end
369
+ end
370
+ end
371
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-rkp
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
+ RKP.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-rkp.rb
38
+ - lib/v20191209/client.rb
39
+ - lib/v20191209/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-rkp
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 - RKP
66
+ test_files: []