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 +4 -4
- data/Gemfile.lock +1 -1
- data/examples/ocr/v20181119/bussiness_card.rb +1 -1
- data/examples/tms/v20190722/text_moderation.rb +19 -0
- data/examples/trtc/v20190722/describe_room_information.rb +1 -1
- data/examples/trtc/v20190722/start_mcu_mix_transcode.rb +1 -1
- data/lib/tencent_cloud/tms/v20200713/tms_client.rb +28 -0
- data/lib/tencent_cloud/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25511cf9fe38372b9a86f1fcaaee0a8e4904099ef4c195fef193a737e8b05a2f
|
4
|
+
data.tar.gz: 190e111e10d523adc06b57fa9b84b8dc78b2c6034fc24c482c38abd59d2b5024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ee550925f47810de542d09d3b64c9beb45a26b57467dd851389a007d90e16de59bd2e894d239c2fa570b26bd8519b762090a68c3f5335607d3c03b1814dfcd2
|
7
|
+
data.tar.gz: 8230ed2680ccd8b3b0ee9abe78b0505ad653510a0ca836aaf1b4986c3aa192410811260251501d042fd338bad418ea1d72ed11566be80067b4b9a0686e75cf25
|
data/Gemfile.lock
CHANGED
@@ -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)
|
@@ -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
|
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.
|
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
|
+
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
|