tencentcloud-sdk-es 3.0.1041 → 3.0.1043

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4fd4caa9ce463822e1885ed45ec900ff414feb5
4
- data.tar.gz: 68c34136b781e4921dce0268c9b3dc49db4640ec
3
+ metadata.gz: 495b28581650787cc34b860e434a721f44f780ff
4
+ data.tar.gz: f7b1109abc9202d0ebb957f4573f96c7699574ae
5
5
  SHA512:
6
- metadata.gz: 912784088eb5a42a4d1d3cdeb51334a5babac46859020f6590f9054935cabb60efc7aa0667cb1f8f0d4f476d37c7b026dfd505c9b62c5c6cbb2ac0f62ba71f21
7
- data.tar.gz: 09062f0c8deaff75416b5f44999b19a9b1cc0b3dc92a2dc51e84df3e71dd84c1ee92d3dda86a465daf4ecb2f26484c96c12e0653325611e691a81d8b9f7076b8
6
+ metadata.gz: 1113390014c8171f6d7f28c6898441ebd3efe90790e1a4454c157deb04d968beae1bdbec918def7623202e6953cd990183aa94bb0e536c7db384a3398d8a3d01
7
+ data.tar.gz: eb9d6b82ed390c2e9c70e7c813e7102802b812c3d56eb1682bbf2f45b840dd4bbff90d53a30ed12215813e6e3ddbc0f4c6bd0f20d59c327c239c27deb6533eb1
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1041
1
+ 3.0.1043
@@ -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
@@ -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
@@ -901,6 +901,128 @@ module TencentCloud
901
901
  end
902
902
  end
903
903
 
904
+ # 网页搜索结果
905
+ class WebPage < TencentCloud::Common::AbstractModel
906
+ # @param Title: 标题
907
+ # @type Title: String
908
+ # @param Url: url
909
+ # @type Url: String
910
+ # @param Summary: 网页摘要
911
+ # 注意:此字段可能返回 null,表示取不到有效值。
912
+ # @type Summary: String
913
+ # @param Time: 网页收录时间。可能为空。
914
+ # 注意:此字段可能返回 null,表示取不到有效值。
915
+ # @type Time: String
916
+ # @param Content: Markdown 格式的网页正文
917
+ # 注意:此字段可能返回 null,表示取不到有效值。
918
+ # @type Content: String
919
+
920
+ attr_accessor :Title, :Url, :Summary, :Time, :Content
921
+
922
+ def initialize(title=nil, url=nil, summary=nil, time=nil, content=nil)
923
+ @Title = title
924
+ @Url = url
925
+ @Summary = summary
926
+ @Time = time
927
+ @Content = content
928
+ end
929
+
930
+ def deserialize(params)
931
+ @Title = params['Title']
932
+ @Url = params['Url']
933
+ @Summary = params['Summary']
934
+ @Time = params['Time']
935
+ @Content = params['Content']
936
+ end
937
+ end
938
+
939
+ # WebSearch请求参数结构体
940
+ class WebSearchRequest < TencentCloud::Common::AbstractModel
941
+ # @param Query: 查询
942
+ # @type Query: String
943
+ # @param Count: 搜索的网页数量,默认20
944
+ # @type Count: Integer
945
+ # @param Site: 指定域名,gov.cn 可匹配 *.gov.cn的域名。
946
+ # @type Site: String
947
+ # @param FetchContent: 是否获取返回网页全文,默认 false。
948
+ # @type FetchContent: Boolean
949
+ # @param WhiteSites: 域名白名单,在不指定 Site 时,只保存匹配白名单域名的网页。
950
+ # @type WhiteSites: Array
951
+ # @param BlackSites: 域名黑名单,在不指定 Site 和白名单时,过滤黑名单中的域名。
952
+ # @type BlackSites: Array
953
+ # @param StartTime: 秒级时间戳,搜索网页的开始时间,默认不限制开始时间。
954
+ # @type StartTime: Integer
955
+ # @param EndTime: 秒级时间戳,搜索网页的结束时间,默认为现在。
956
+ # @type EndTime: Integer
957
+ # @param SearchEngine: 指定搜索引擎,可选混合搜索 mixed,或 bing, baidu, sogou, 默认为 sogou
958
+ # @type SearchEngine: String
959
+
960
+ attr_accessor :Query, :Count, :Site, :FetchContent, :WhiteSites, :BlackSites, :StartTime, :EndTime, :SearchEngine
961
+
962
+ def initialize(query=nil, count=nil, site=nil, fetchcontent=nil, whitesites=nil, blacksites=nil, starttime=nil, endtime=nil, searchengine=nil)
963
+ @Query = query
964
+ @Count = count
965
+ @Site = site
966
+ @FetchContent = fetchcontent
967
+ @WhiteSites = whitesites
968
+ @BlackSites = blacksites
969
+ @StartTime = starttime
970
+ @EndTime = endtime
971
+ @SearchEngine = searchengine
972
+ end
973
+
974
+ def deserialize(params)
975
+ @Query = params['Query']
976
+ @Count = params['Count']
977
+ @Site = params['Site']
978
+ @FetchContent = params['FetchContent']
979
+ @WhiteSites = params['WhiteSites']
980
+ @BlackSites = params['BlackSites']
981
+ @StartTime = params['StartTime']
982
+ @EndTime = params['EndTime']
983
+ @SearchEngine = params['SearchEngine']
984
+ end
985
+ end
986
+
987
+ # WebSearch返回参数结构体
988
+ class WebSearchResponse < TencentCloud::Common::AbstractModel
989
+ # @param Query: 查询
990
+ # @type Query: String
991
+ # @param Status: 响应状态
992
+ # @type Status: String
993
+ # @param SearchEngine: 执行搜索的引擎
994
+ # @type SearchEngine: String
995
+ # @param Results: 搜索结果
996
+ # @type Results: Array
997
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
998
+ # @type RequestId: String
999
+
1000
+ attr_accessor :Query, :Status, :SearchEngine, :Results, :RequestId
1001
+
1002
+ def initialize(query=nil, status=nil, searchengine=nil, results=nil, requestid=nil)
1003
+ @Query = query
1004
+ @Status = status
1005
+ @SearchEngine = searchengine
1006
+ @Results = results
1007
+ @RequestId = requestid
1008
+ end
1009
+
1010
+ def deserialize(params)
1011
+ @Query = params['Query']
1012
+ @Status = params['Status']
1013
+ @SearchEngine = params['SearchEngine']
1014
+ unless params['Results'].nil?
1015
+ @Results = []
1016
+ params['Results'].each do |i|
1017
+ webpage_tmp = WebPage.new
1018
+ webpage_tmp.deserialize(i)
1019
+ @Results << webpage_tmp
1020
+ end
1021
+ end
1022
+ @RequestId = params['RequestId']
1023
+ end
1024
+ end
1025
+
904
1026
  end
905
1027
  end
906
1028
  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.1041
4
+ version: 3.0.1043
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-16 00:00:00.000000000 Z
11
+ date: 2025-04-21 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: