tencentcloud-sdk-tkgdq 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 +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-tkgdq.rb +11 -0
- data/lib/v20190411/client.rb +108 -0
- data/lib/v20190411/models.rb +263 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1a3fc954d6dee985628e1c4bf4795b97c11fec52
|
4
|
+
data.tar.gz: 7236f649aff6f9986430e981da7545c7a3fca28d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d283b0591b1075cb7c69ab9b00231fd03f3d75c594bd8cac5571686173191698079fb1702a968816f8b5aaeb826fbfa8add05d15a7e66a16d53070b9a9a999b9
|
7
|
+
data.tar.gz: 8a21e3bacc04249bb5abaab8371bbe71240ef5b9db0ca2fbb1ecb317686af45680cd7e8dd9a7d0fdb8329dd4969380070d32271bddc22fc694368cd5f3cc32c3
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.200
|
@@ -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 Tkgdq
|
21
|
+
module V20190411
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2019-04-11'
|
26
|
+
api_endpoint = 'tkgdq.tencentcloudapi.com'
|
27
|
+
sdk_version = 'TKGDQ_' + 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 DescribeEntity.
|
35
|
+
# @type request: :class:`Tencentcloud::tkgdq::V20190411::DescribeEntityRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::tkgdq::V20190411::DescribeEntityResponse`
|
37
|
+
def DescribeEntity(request)
|
38
|
+
body = send_request('DescribeEntity', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = DescribeEntityResponse.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 DescribeRelation.
|
59
|
+
# @type request: :class:`Tencentcloud::tkgdq::V20190411::DescribeRelationRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::tkgdq::V20190411::DescribeRelationResponse`
|
61
|
+
def DescribeRelation(request)
|
62
|
+
body = send_request('DescribeRelation', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = DescribeRelationResponse.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
|
+
# 三元组查询,主要分为两类,SP查询和PO查询。SP查询表示已知主语和谓语查询宾语,PO查询表示已知宾语和谓语查询主语。每一个SP或PO查询都是一个可独立执行的查询,TQL支持SP查询的嵌套查询,即主语可以是一个嵌套的子查询。其他复杂的三元组查询方法,请参考官网API文档示例。
|
81
|
+
|
82
|
+
# @param request: Request instance for DescribeTriple.
|
83
|
+
# @type request: :class:`Tencentcloud::tkgdq::V20190411::DescribeTripleRequest`
|
84
|
+
# @rtype: :class:`Tencentcloud::tkgdq::V20190411::DescribeTripleResponse`
|
85
|
+
def DescribeTriple(request)
|
86
|
+
body = send_request('DescribeTriple', request.serialize)
|
87
|
+
response = JSON.parse(body)
|
88
|
+
if response['Response'].key?('Error') == false
|
89
|
+
model = DescribeTripleResponse.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,263 @@
|
|
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 Tkgdq
|
19
|
+
module V20190411
|
20
|
+
# DescribeEntity请求参数结构体
|
21
|
+
class DescribeEntityRequest < TencentCloud::Common::AbstractModel
|
22
|
+
# @param EntityName: 实体名称
|
23
|
+
# @type EntityName: String
|
24
|
+
|
25
|
+
attr_accessor :EntityName
|
26
|
+
|
27
|
+
def initialize(entityname=nil)
|
28
|
+
@EntityName = entityname
|
29
|
+
end
|
30
|
+
|
31
|
+
def deserialize(params)
|
32
|
+
@EntityName = params['EntityName']
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# DescribeEntity返回参数结构体
|
37
|
+
class DescribeEntityResponse < TencentCloud::Common::AbstractModel
|
38
|
+
# @param Content: 返回查询实体相关信息
|
39
|
+
# @type Content: String
|
40
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
41
|
+
# @type RequestId: String
|
42
|
+
|
43
|
+
attr_accessor :Content, :RequestId
|
44
|
+
|
45
|
+
def initialize(content=nil, requestid=nil)
|
46
|
+
@Content = content
|
47
|
+
@RequestId = requestid
|
48
|
+
end
|
49
|
+
|
50
|
+
def deserialize(params)
|
51
|
+
@Content = params['Content']
|
52
|
+
@RequestId = params['RequestId']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# DescribeRelation请求参数结构体
|
57
|
+
class DescribeRelationRequest < TencentCloud::Common::AbstractModel
|
58
|
+
# @param LeftEntityName: 输入第一个实体
|
59
|
+
# @type LeftEntityName: String
|
60
|
+
# @param RightEntityName: 输入第二个实体
|
61
|
+
# @type RightEntityName: String
|
62
|
+
|
63
|
+
attr_accessor :LeftEntityName, :RightEntityName
|
64
|
+
|
65
|
+
def initialize(leftentityname=nil, rightentityname=nil)
|
66
|
+
@LeftEntityName = leftentityname
|
67
|
+
@RightEntityName = rightentityname
|
68
|
+
end
|
69
|
+
|
70
|
+
def deserialize(params)
|
71
|
+
@LeftEntityName = params['LeftEntityName']
|
72
|
+
@RightEntityName = params['RightEntityName']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# DescribeRelation返回参数结构体
|
77
|
+
class DescribeRelationResponse < TencentCloud::Common::AbstractModel
|
78
|
+
# @param Content: 返回查询实体间的关系
|
79
|
+
# @type Content: Array
|
80
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
81
|
+
# @type RequestId: String
|
82
|
+
|
83
|
+
attr_accessor :Content, :RequestId
|
84
|
+
|
85
|
+
def initialize(content=nil, requestid=nil)
|
86
|
+
@Content = content
|
87
|
+
@RequestId = requestid
|
88
|
+
end
|
89
|
+
|
90
|
+
def deserialize(params)
|
91
|
+
unless params['Content'].nil?
|
92
|
+
@Content = []
|
93
|
+
params['Content'].each do |i|
|
94
|
+
entityrelationcontent_tmp = EntityRelationContent.new
|
95
|
+
entityrelationcontent_tmp.deserialize(i)
|
96
|
+
@Content << entityrelationcontent_tmp
|
97
|
+
end
|
98
|
+
end
|
99
|
+
@RequestId = params['RequestId']
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# DescribeTriple请求参数结构体
|
104
|
+
class DescribeTripleRequest < TencentCloud::Common::AbstractModel
|
105
|
+
# @param TripleCondition: 三元组查询条件
|
106
|
+
# @type TripleCondition: String
|
107
|
+
|
108
|
+
attr_accessor :TripleCondition
|
109
|
+
|
110
|
+
def initialize(triplecondition=nil)
|
111
|
+
@TripleCondition = triplecondition
|
112
|
+
end
|
113
|
+
|
114
|
+
def deserialize(params)
|
115
|
+
@TripleCondition = params['TripleCondition']
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# DescribeTriple返回参数结构体
|
120
|
+
class DescribeTripleResponse < TencentCloud::Common::AbstractModel
|
121
|
+
# @param Content: 返回三元组信息
|
122
|
+
# @type Content: Array
|
123
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
124
|
+
# @type RequestId: String
|
125
|
+
|
126
|
+
attr_accessor :Content, :RequestId
|
127
|
+
|
128
|
+
def initialize(content=nil, requestid=nil)
|
129
|
+
@Content = content
|
130
|
+
@RequestId = requestid
|
131
|
+
end
|
132
|
+
|
133
|
+
def deserialize(params)
|
134
|
+
unless params['Content'].nil?
|
135
|
+
@Content = []
|
136
|
+
params['Content'].each do |i|
|
137
|
+
triplecontent_tmp = TripleContent.new
|
138
|
+
triplecontent_tmp.deserialize(i)
|
139
|
+
@Content << triplecontent_tmp
|
140
|
+
end
|
141
|
+
end
|
142
|
+
@RequestId = params['RequestId']
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# 返回的实体关系查询结果详细内容
|
147
|
+
class EntityRelationContent < TencentCloud::Common::AbstractModel
|
148
|
+
# @param Object: 实体关系查询返回关系的object
|
149
|
+
# @type Object: Array
|
150
|
+
# @param Subject: 实体关系查询返回关系的subject
|
151
|
+
# @type Subject: Array
|
152
|
+
# @param Relation: 实体关系查询返回的关系名称
|
153
|
+
# @type Relation: String
|
154
|
+
|
155
|
+
attr_accessor :Object, :Subject, :Relation
|
156
|
+
|
157
|
+
def initialize(object=nil, subject=nil, relation=nil)
|
158
|
+
@Object = object
|
159
|
+
@Subject = subject
|
160
|
+
@Relation = relation
|
161
|
+
end
|
162
|
+
|
163
|
+
def deserialize(params)
|
164
|
+
unless params['Object'].nil?
|
165
|
+
@Object = []
|
166
|
+
params['Object'].each do |i|
|
167
|
+
entityrelationobject_tmp = EntityRelationObject.new
|
168
|
+
entityrelationobject_tmp.deserialize(i)
|
169
|
+
@Object << entityrelationobject_tmp
|
170
|
+
end
|
171
|
+
end
|
172
|
+
unless params['Subject'].nil?
|
173
|
+
@Subject = []
|
174
|
+
params['Subject'].each do |i|
|
175
|
+
entityrelationsubject_tmp = EntityRelationSubject.new
|
176
|
+
entityrelationsubject_tmp.deserialize(i)
|
177
|
+
@Subject << entityrelationsubject_tmp
|
178
|
+
end
|
179
|
+
end
|
180
|
+
@Relation = params['Relation']
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# 实体关系查询返回的Object类型
|
185
|
+
class EntityRelationObject < TencentCloud::Common::AbstractModel
|
186
|
+
# @param Id: object对应id
|
187
|
+
# @type Id: Array
|
188
|
+
# @param Name: object对应name
|
189
|
+
# @type Name: Array
|
190
|
+
# @param Popular: object对应popular值
|
191
|
+
# @type Popular: Array
|
192
|
+
|
193
|
+
attr_accessor :Id, :Name, :Popular
|
194
|
+
|
195
|
+
def initialize(id=nil, name=nil, popular=nil)
|
196
|
+
@Id = id
|
197
|
+
@Name = name
|
198
|
+
@Popular = popular
|
199
|
+
end
|
200
|
+
|
201
|
+
def deserialize(params)
|
202
|
+
@Id = params['Id']
|
203
|
+
@Name = params['Name']
|
204
|
+
@Popular = params['Popular']
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# 实体关系查询返回Subject
|
209
|
+
class EntityRelationSubject < TencentCloud::Common::AbstractModel
|
210
|
+
# @param Id: Subject对应id
|
211
|
+
# @type Id: Array
|
212
|
+
# @param Name: Subject对应name
|
213
|
+
# @type Name: Array
|
214
|
+
# @param Popular: Subject对应popular
|
215
|
+
# @type Popular: Array
|
216
|
+
|
217
|
+
attr_accessor :Id, :Name, :Popular
|
218
|
+
|
219
|
+
def initialize(id=nil, name=nil, popular=nil)
|
220
|
+
@Id = id
|
221
|
+
@Name = name
|
222
|
+
@Popular = popular
|
223
|
+
end
|
224
|
+
|
225
|
+
def deserialize(params)
|
226
|
+
@Id = params['Id']
|
227
|
+
@Name = params['Name']
|
228
|
+
@Popular = params['Popular']
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
# 三元组查询返回的元记录
|
233
|
+
class TripleContent < TencentCloud::Common::AbstractModel
|
234
|
+
# @param Id: 实体id
|
235
|
+
# @type Id: String
|
236
|
+
# @param Name: 实体名称
|
237
|
+
# @type Name: String
|
238
|
+
# @param Order: 实体order
|
239
|
+
# @type Order: Integer
|
240
|
+
# @param Popular: 实体流行度
|
241
|
+
# @type Popular: Integer
|
242
|
+
|
243
|
+
attr_accessor :Id, :Name, :Order, :Popular
|
244
|
+
|
245
|
+
def initialize(id=nil, name=nil, order=nil, popular=nil)
|
246
|
+
@Id = id
|
247
|
+
@Name = name
|
248
|
+
@Order = order
|
249
|
+
@Popular = popular
|
250
|
+
end
|
251
|
+
|
252
|
+
def deserialize(params)
|
253
|
+
@Id = params['Id']
|
254
|
+
@Name = params['Name']
|
255
|
+
@Order = params['Order']
|
256
|
+
@Popular = params['Popular']
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-tkgdq
|
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
|
+
TKGDQ.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/VERSION
|
37
|
+
- lib/tencentcloud-sdk-tkgdq.rb
|
38
|
+
- lib/v20190411/client.rb
|
39
|
+
- lib/v20190411/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-tkgdq
|
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 - TKGDQ
|
66
|
+
test_files: []
|