tencentcloud-sdk-ruby 0.2.1 → 0.3.1

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
  SHA256:
3
- metadata.gz: bef24153252e3be00debe0c3cb2455dbf220d216fa01407e4f88b76cd0dc5048
4
- data.tar.gz: 205a092a3b6e25e050ef4dff9429d41db0fd9fc32a635b0e924f951e1a6fa04d
3
+ metadata.gz: 25511cf9fe38372b9a86f1fcaaee0a8e4904099ef4c195fef193a737e8b05a2f
4
+ data.tar.gz: 190e111e10d523adc06b57fa9b84b8dc78b2c6034fc24c482c38abd59d2b5024
5
5
  SHA512:
6
- metadata.gz: be87d248596703cdb93061174665110371e0af2049121e1c00db44c4d0ca6ca229dfbc680189fb142d4909a96f06bc6badf2e341392d795fe7eca09917e17ea1
7
- data.tar.gz: b22b4d67db074a1f81b59ca0604eee9b487d45cf13d916249511ac0078c97d9f36846937c2ae5ee618aa64620210d270ae4dd48097e2a0af5a05c720c51b3c19
6
+ metadata.gz: 4ee550925f47810de542d09d3b64c9beb45a26b57467dd851389a007d90e16de59bd2e894d239c2fa570b26bd8519b762090a68c3f5335607d3c03b1814dfcd2
7
+ data.tar.gz: 8230ed2680ccd8b3b0ee9abe78b0505ad653510a0ca836aaf1b4986c3aa192410811260251501d042fd338bad418ea1d72ed11566be80067b4b9a0686e75cf25
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tencentcloud-sdk-ruby (0.2.1)
4
+ tencentcloud-sdk-ruby (0.3.1)
5
5
  typhoeus (~> 1.0)
6
6
 
7
7
  GEM
@@ -11,4 +11,4 @@ payload = {
11
11
  'ImageUrl' => 'IMAGE URL'
12
12
  }
13
13
  resp = TencentCloud::OcrClient.new(credential, 'ap-beijing').business_card_ocr(payload)
14
- puts resp.body
14
+ pp JSON.parse(resp.body)
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/setup'
4
+ require 'tencent_cloud'
5
+ require 'tencent_cloud/tms/v20200713/tms_client'
6
+ require 'base64'
7
+ # replace secret_id secret_key
8
+ secret_id = 'SECRET_ID'
9
+ secret_key = 'SECRET_KEY'
10
+ credential = TencentCloud::Common::Credential.new(secret_id, secret_key)
11
+ str = Base64.encode64('
12
+ 北京时间12月16日,在马刺对阵火箭的比赛中,马刺遗憾输掉比赛。不过马刺也不是没有惊喜,他们的首轮秀瓦塞尔继续有精彩表现,全场打了31分钟,拿到了11分4板4抢断,8投4中的命中率。虽然球队输球,但是瓦塞尔的表现不错,不仅进攻端表现出色,面对哈登也不胆怯,哈登全场10投3中,被成功防死,瓦塞尔功不可没。
13
+ ')
14
+
15
+ payload = {
16
+ 'Content': str
17
+ }
18
+ resp = TencentCloud::TmsClient.new(credential, 'ap-hongkong').text_moderation(payload)
19
+ pp JSON.parse(resp.body)
@@ -13,4 +13,4 @@ payload = {
13
13
  'EndTime' => Time.now.to_i
14
14
  }
15
15
  resp = TencentCloud::TrtcClient.new(credential, 'ap-guangzhou').describe_room_information(payload)
16
- puts resp.body
16
+ pp JSON.parse(resp.body)
@@ -31,4 +31,4 @@ payload = {
31
31
  }
32
32
  }
33
33
  resp = TencentCloud::TrtcClient.new(credential, 'ap-guangzhou').start_mcu_mix_transcode(payload)
34
- puts resp.body
34
+ pp JSON.parse(resp.body)
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencent_cloud/common/base_client'
4
+ module TencentCloud
5
+ class TmsClient < Common::BaseClient
6
+ API_VERSION = '2020-07-13'
7
+ ENDPOINT = 'tms.tencentcloudapi.com'
8
+ SERVICE_NAME = 'tms'
9
+ APIS = {
10
+ #################### 文本内容审核相关接口
11
+ ## 账号举报接口
12
+ ## https://cloud.tencent.com/document/api/1124/47690
13
+ account_tipoff_access: 'AccountTipoffAccess',
14
+
15
+ ## 识别统计
16
+ ## https://cloud.tencent.com/document/api/1124/51003
17
+ describe_text_stat: 'DescribeTextStat',
18
+
19
+ ## 获取用户词库列表
20
+ ## https://cloud.tencent.com/document/api/1124/51004
21
+ describe_text_lib: 'DescribeTextLib',
22
+
23
+ ## 文本内容安全
24
+ ## https://cloud.tencent.com/document/api/1124/46976
25
+ text_moderation: 'TextModeration',
26
+ }
27
+ end
28
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TencentCloud
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - FengCe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-16 00:00:00.000000000 Z
11
+ date: 2020-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,6 +100,7 @@ files:
100
100
  - bin/console
101
101
  - bin/setup
102
102
  - examples/ocr/v20181119/bussiness_card.rb
103
+ - examples/tms/v20190722/text_moderation.rb
103
104
  - examples/trtc/v20190722/describe_room_information.rb
104
105
  - examples/trtc/v20190722/start_mcu_mix_transcode.rb
105
106
  - lib/tencent_cloud.rb
@@ -109,6 +110,7 @@ files:
109
110
  - lib/tencent_cloud/common/http/request.rb
110
111
  - lib/tencent_cloud/common/http/sign.rb
111
112
  - lib/tencent_cloud/ocr/v20181119/ocr_client.rb
113
+ - lib/tencent_cloud/tms/v20200713/tms_client.rb
112
114
  - lib/tencent_cloud/trtc/v20190722/trtc_client.rb
113
115
  - lib/tencent_cloud/version.rb
114
116
  - tencent_cloud.gemspec