tencentcloud-sdk-es 3.0.1041 → 3.0.1042
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 +4 -4
- data/lib/VERSION +1 -1
- data/lib/tencentcloud-sdk-es.rb +3 -3
- data/lib/v20250101/client.rb +24 -0
- data/lib/v20250101/models.rb +124 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11898a8194bf80728cde251b0945323ae2a4d758
|
4
|
+
data.tar.gz: a34dcb2d9684be1077d559f1f3be281da05d27a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5160d0049879055c2a169b6d715b75f5aa93e903f0a95fd864c061f4e2fb61a387e99202e0acdc137847978f12b0e67cd2e7a6e01a7223d69531e744df57112
|
7
|
+
data.tar.gz: a7413e44b84346f6b8b9fc9641bf16a4ac4e9cfd859e331f856126f38584f6ec26f542ffbd124a144e27a8e13aabf0ee20fb8d62fec80540fe39c4bc1335d114
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1042
|
data/lib/tencentcloud-sdk-es.rb
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
require 'tencentcloud-sdk-common'
|
4
4
|
|
5
|
-
require_relative 'v20180416/client'
|
6
|
-
require_relative 'v20180416/models'
|
7
|
-
|
8
5
|
require_relative 'v20250101/client'
|
9
6
|
require_relative 'v20250101/models'
|
10
7
|
|
8
|
+
require_relative 'v20180416/client'
|
9
|
+
require_relative 'v20180416/models'
|
10
|
+
|
11
11
|
module TencentCloud
|
12
12
|
module Es
|
13
13
|
end
|
data/lib/v20250101/client.rb
CHANGED
@@ -250,6 +250,30 @@ module TencentCloud
|
|
250
250
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
251
251
|
end
|
252
252
|
|
253
|
+
# WebSearch API 是一个网页搜索服务,支持多种搜索引擎,可以获取网页的标题、URL、摘要和正文内容。
|
254
|
+
|
255
|
+
# @param request: Request instance for WebSearch.
|
256
|
+
# @type request: :class:`Tencentcloud::es::V20250101::WebSearchRequest`
|
257
|
+
# @rtype: :class:`Tencentcloud::es::V20250101::WebSearchResponse`
|
258
|
+
def WebSearch(request)
|
259
|
+
body = send_request('WebSearch', request.serialize)
|
260
|
+
response = JSON.parse(body)
|
261
|
+
if response['Response'].key?('Error') == false
|
262
|
+
model = WebSearchResponse.new
|
263
|
+
model.deserialize(response['Response'])
|
264
|
+
model
|
265
|
+
else
|
266
|
+
code = response['Response']['Error']['Code']
|
267
|
+
message = response['Response']['Error']['Message']
|
268
|
+
reqid = response['Response']['RequestId']
|
269
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
270
|
+
end
|
271
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
272
|
+
raise e
|
273
|
+
rescue StandardError => e
|
274
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
275
|
+
end
|
276
|
+
|
253
277
|
|
254
278
|
end
|
255
279
|
end
|
data/lib/v20250101/models.rb
CHANGED
@@ -901,6 +901,130 @@ module TencentCloud
|
|
901
901
|
end
|
902
902
|
end
|
903
903
|
|
904
|
+
# 网页搜索结果
|
905
|
+
class WebPage < TencentCloud::Common::AbstractModel
|
906
|
+
# @param Title: 标题
|
907
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
908
|
+
# @type Title: String
|
909
|
+
# @param Url: url
|
910
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
911
|
+
# @type Url: String
|
912
|
+
# @param Summary: 网页摘要
|
913
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
914
|
+
# @type Summary: String
|
915
|
+
# @param Time: 网页收录时间。可能为空。
|
916
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
917
|
+
# @type Time: String
|
918
|
+
# @param Content: Markdown 格式的网页正文
|
919
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
920
|
+
# @type Content: String
|
921
|
+
|
922
|
+
attr_accessor :Title, :Url, :Summary, :Time, :Content
|
923
|
+
|
924
|
+
def initialize(title=nil, url=nil, summary=nil, time=nil, content=nil)
|
925
|
+
@Title = title
|
926
|
+
@Url = url
|
927
|
+
@Summary = summary
|
928
|
+
@Time = time
|
929
|
+
@Content = content
|
930
|
+
end
|
931
|
+
|
932
|
+
def deserialize(params)
|
933
|
+
@Title = params['Title']
|
934
|
+
@Url = params['Url']
|
935
|
+
@Summary = params['Summary']
|
936
|
+
@Time = params['Time']
|
937
|
+
@Content = params['Content']
|
938
|
+
end
|
939
|
+
end
|
940
|
+
|
941
|
+
# WebSearch请求参数结构体
|
942
|
+
class WebSearchRequest < TencentCloud::Common::AbstractModel
|
943
|
+
# @param Query: 查询
|
944
|
+
# @type Query: String
|
945
|
+
# @param Count: 搜索的网页数量,默认20
|
946
|
+
# @type Count: Integer
|
947
|
+
# @param Site: 指定域名,gov.cn 可匹配 *.gov.cn的域名。
|
948
|
+
# @type Site: String
|
949
|
+
# @param FetchContent: 是否获取返回网页全文,默认 false。
|
950
|
+
# @type FetchContent: Boolean
|
951
|
+
# @param WhiteSites: 域名白名单,在不指定 Site 时,只保存匹配白名单域名的网页。
|
952
|
+
# @type WhiteSites: Array
|
953
|
+
# @param BlackSites: 域名黑名单,在不指定 Site 和白名单时,过滤黑名单中的域名。
|
954
|
+
# @type BlackSites: Array
|
955
|
+
# @param StartTime: 秒级时间冲,搜索网页的开始时间,默认不限制开始时间。
|
956
|
+
# @type StartTime: Integer
|
957
|
+
# @param EndTime: 秒级时间戳,搜索网页的结束时间,默认为现在。
|
958
|
+
# @type EndTime: Integer
|
959
|
+
# @param SearchEngine: 指定搜索引擎,可选混合搜索 mixed,或 bing, baidu, sogou, 默认为 sogou
|
960
|
+
# @type SearchEngine: String
|
961
|
+
|
962
|
+
attr_accessor :Query, :Count, :Site, :FetchContent, :WhiteSites, :BlackSites, :StartTime, :EndTime, :SearchEngine
|
963
|
+
|
964
|
+
def initialize(query=nil, count=nil, site=nil, fetchcontent=nil, whitesites=nil, blacksites=nil, starttime=nil, endtime=nil, searchengine=nil)
|
965
|
+
@Query = query
|
966
|
+
@Count = count
|
967
|
+
@Site = site
|
968
|
+
@FetchContent = fetchcontent
|
969
|
+
@WhiteSites = whitesites
|
970
|
+
@BlackSites = blacksites
|
971
|
+
@StartTime = starttime
|
972
|
+
@EndTime = endtime
|
973
|
+
@SearchEngine = searchengine
|
974
|
+
end
|
975
|
+
|
976
|
+
def deserialize(params)
|
977
|
+
@Query = params['Query']
|
978
|
+
@Count = params['Count']
|
979
|
+
@Site = params['Site']
|
980
|
+
@FetchContent = params['FetchContent']
|
981
|
+
@WhiteSites = params['WhiteSites']
|
982
|
+
@BlackSites = params['BlackSites']
|
983
|
+
@StartTime = params['StartTime']
|
984
|
+
@EndTime = params['EndTime']
|
985
|
+
@SearchEngine = params['SearchEngine']
|
986
|
+
end
|
987
|
+
end
|
988
|
+
|
989
|
+
# WebSearch返回参数结构体
|
990
|
+
class WebSearchResponse < TencentCloud::Common::AbstractModel
|
991
|
+
# @param Query: 查询
|
992
|
+
# @type Query: String
|
993
|
+
# @param Status: 响应状态
|
994
|
+
# @type Status: String
|
995
|
+
# @param SearchEngine: 执行搜索的引擎
|
996
|
+
# @type SearchEngine: String
|
997
|
+
# @param Results: 搜索结果
|
998
|
+
# @type Results: Array
|
999
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
1000
|
+
# @type RequestId: String
|
1001
|
+
|
1002
|
+
attr_accessor :Query, :Status, :SearchEngine, :Results, :RequestId
|
1003
|
+
|
1004
|
+
def initialize(query=nil, status=nil, searchengine=nil, results=nil, requestid=nil)
|
1005
|
+
@Query = query
|
1006
|
+
@Status = status
|
1007
|
+
@SearchEngine = searchengine
|
1008
|
+
@Results = results
|
1009
|
+
@RequestId = requestid
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
def deserialize(params)
|
1013
|
+
@Query = params['Query']
|
1014
|
+
@Status = params['Status']
|
1015
|
+
@SearchEngine = params['SearchEngine']
|
1016
|
+
unless params['Results'].nil?
|
1017
|
+
@Results = []
|
1018
|
+
params['Results'].each do |i|
|
1019
|
+
webpage_tmp = WebPage.new
|
1020
|
+
webpage_tmp.deserialize(i)
|
1021
|
+
@Results << webpage_tmp
|
1022
|
+
end
|
1023
|
+
end
|
1024
|
+
@RequestId = params['RequestId']
|
1025
|
+
end
|
1026
|
+
end
|
1027
|
+
|
904
1028
|
end
|
905
1029
|
end
|
906
1030
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-es
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1042
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|
@@ -35,9 +35,9 @@ extra_rdoc_files: []
|
|
35
35
|
files:
|
36
36
|
- lib/v20180416/client.rb
|
37
37
|
- lib/v20180416/models.rb
|
38
|
-
- lib/tencentcloud-sdk-es.rb
|
39
38
|
- lib/v20250101/client.rb
|
40
39
|
- lib/v20250101/models.rb
|
40
|
+
- lib/tencentcloud-sdk-es.rb
|
41
41
|
- lib/VERSION
|
42
42
|
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
43
43
|
licenses:
|