wechat 0.11.9 → 0.11.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 370e379885f4c8f7f926fa6a0d7a1d237e0152b9e87d7a87d3732446228b236a
4
- data.tar.gz: 62477c436dd72bb156e22ef936581c881043c9008a077df2cc1f570f089ab43d
3
+ metadata.gz: bae019a8d3da8b0f78aba677ba633a46ecebdf975be517f09b5ec82050b2aee9
4
+ data.tar.gz: 1bdb9f6dd87d72071071e3ff36d4d6334c0ddb0825d2ef5abe243b6298983ee2
5
5
  SHA512:
6
- metadata.gz: f5e603ac0672f10b6b98ef12b05ada4f1f58cec182d5046daec501666ee8204e6ebbe7e1da874b29876252803a2449835b829cb5a3b159e292fb0a4475370e65
7
- data.tar.gz: e2c40b34f6d0ed589da874ee65745eab5f6588400e0dbd812603da7017017498d4666f784ecf7e06e867722b65bc97f8926e5e5e04d311d25cd0b558a3d52f12
6
+ metadata.gz: 0c87ecd9b34fc0c34538bd754e6b35e20cc6e87f138b7434fabf92c3f0ec2a0cfbbc44a7d0e7c88fa52237b293f1744408697043c3f7e624e5eba9c871ba2153
7
+ data.tar.gz: 8a431320b86e529acd98de9482070052fbeb4dcf80538dc9e0d5c2e6a7507460fa848a0bb0c3692c68c89ef8b7dbd0243ef537442680a678b3e871ff4f4ec40f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.11.10 (released at 09/02/2020)
4
+
5
+ * ADD: Wechat::MpApi.wxa_msg_sec_check.
6
+
3
7
  ## v0.11.9 (released at 04/29/2020)
4
8
 
5
9
  * CHG: upgrade ssl_version to 1.2 by @paicha #276
@@ -3,7 +3,7 @@ WeChat [![Gem Version](https://badge.fury.io/rb/wechat.svg)](https://rubygems.or
3
3
 
4
4
  [![Join the chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Eric-Guo/wechat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
5
 
6
- WeChat gem帮助开发者方便地在Rails环境中集成[微信公众平台](https://mp.weixin.qq.com/)[企业微信](https://qy.weixin.qq.com),包括功能:
6
+ WeChat gem帮助开发者方便地在Rails环境中集成[微信公众平台](https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Overview.html)[企业微信](https://work.weixin.qq.com/api/doc)和[小程序](https://developers.weixin.qq.com/miniprogram/dev/framework/),包括功能:
7
7
 
8
8
  - 微信公众平台/企业微信[发送消息](http://qydev.weixin.qq.com/wiki/index.php?title=%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF)API(命令行和Web环境都可以使用)
9
9
  - [接收消息](http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E6%B6%88%E6%81%AF%E4%B8%8E%E4%BA%8B%E4%BB%B6)(必须运行Web服务器)
@@ -399,6 +399,7 @@ Wechat Public Account commands:
399
399
  wechat user_group [OPEN_ID] # 查询用户所在分组
400
400
  wechat user_update_remark [OPEN_ID, REMARK] # 设置备注名
401
401
  wechat users # 关注者列表
402
+ wechat wxa_msg_sec_check [CONTENT] # 检查一段文本是否含有违法违规内容。
402
403
  wechat wxacode_download [WXA_CODE_PIC_PATH, PATH, WIDTH] # 下载小程序码
403
404
  ```
404
405
 
data/README.md CHANGED
@@ -7,7 +7,7 @@ WeChat [![Gem Version](https://badge.fury.io/rb/wechat.svg)](https://rubygems.or
7
7
 
8
8
  [Wechat](http://www.wechat.com/) is a Chinese multi-purpose messaging, social media and mobile payment app developed by Tencent. It was first released in 2011, and by 2018 it was one of the world's largest standalone mobile apps by monthly active users, with over 1 billion monthly active users (902 million daily active users). (According to [wiki](https://en.wikipedia.org/wiki/WeChat))
9
9
 
10
- WeChat gem helps Rails developers integrate [WeChat Official Accounts Platform](https://mp.weixin.qq.com/) and [Wechat Enterprise](https://qy.weixin.qq.com) easily, including features:
10
+ WeChat gem helps Rails developers integrate [WeChat Official Accounts Platform](https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Overview.html) or [Wechat mini program](https://developers.weixin.qq.com/miniprogram/dev/framework/) easily, including features:
11
11
 
12
12
  - [Sending message](http://qydev.weixin.qq.com/wiki/index.php?title=%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF) API(can be both accessed via console or rails server)
13
13
  - [Receiving message](http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E6%B6%88%E6%81%AF%E4%B8%8E%E4%BA%8B%E4%BB%B6)(rails server is required to be running)
@@ -430,6 +430,7 @@ Wechat Public Account commands:
430
430
  wechat user_group [OPEN_ID] # 查询用户所在分组
431
431
  wechat user_update_remark [OPEN_ID, REMARK] # 设置备注名
432
432
  wechat users # 关注者列表
433
+ wechat wxa_msg_sec_check [CONTENT] # 检查一段文本是否含有违法违规内容。
433
434
  wechat wxacode_download [WXA_CODE_PIC_PATH, PATH, WIDTH] # 下载小程序码
434
435
  wechat clear_quota # 接口调用次数清零
435
436
  ```
data/bin/wechat CHANGED
@@ -225,6 +225,11 @@ class App < Thor
225
225
  puts 'WXA Code File downloaded'
226
226
  end
227
227
 
228
+ desc 'wxa_msg_sec_check [CONTENT]', '检查一段文本是否含有违法违规内容。'
229
+ def wxa_msg_sec_check(content)
230
+ puts wechat_api.wxa_msg_sec_check(content)
231
+ end
232
+
228
233
  desc 'media_uploadnews [MPNEWS_YAML_PATH]', '上传图文消息素材'
229
234
  def media_uploadnews(mpnews_yaml_path)
230
235
  mpnew = YAML.load(File.read(mpnews_yaml_path))
@@ -6,7 +6,7 @@ module Wechat
6
6
 
7
7
  API_BASE = 'https://api.weixin.qq.com/cgi-bin/'
8
8
  MP_BASE = 'https://mp.weixin.qq.com/cgi-bin/'
9
- WXA_BASE = 'https://api.weixin.qq.com/wxa/'
9
+ WXA_BASE = 'https://api.weixin.qq.com/wxa/'
10
10
  OAUTH2_BASE = 'https://api.weixin.qq.com/sns/'
11
11
  DATACUBE_BASE = 'https://api.weixin.qq.com/datacube/'
12
12
  QYAPI_BASE = 'https://qyapi.weixin.qq.com/cgi-bin/'
@@ -106,6 +106,10 @@ module Wechat
106
106
  post 'wxaapp/createwxaqrcode', JSON.generate(path: path, width: width)
107
107
  end
108
108
 
109
+ def wxa_msg_sec_check(content)
110
+ post 'msg_sec_check', JSON.generate(content: content), base: Wechat::Api::WXA_BASE
111
+ end
112
+
109
113
  def menu
110
114
  get 'menu/get'
111
115
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wechat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.9
4
+ version: 0.11.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skinnyworm
8
8
  - Eric Guo
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
14
  MIIEQDCCAqigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBplcmlj
15
- Lmd1b2N6L0RDPWdtYWlsL0RDPWNvbTAeFw0xOTA4MzAwODIzMTVaFw0yMDA4Mjkw
16
- ODIzMTVaMCUxIzAhBgNVBAMMGmVyaWMuZ3VvY3ovREM9Z21haWwvREM9Y29tMIIB
17
- ojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA2ZlFyUImo53jN4+1Kk6cyGts
18
- LcT2x+i3G4mvZeqrZFCyhgWHJ04oAsfKBLCLRmspRsUuDQ3GQ8P5tH9oTduu55qy
19
- ohflwuuffJHwsJYJEQ4hykJSCQ8gd4qj8WrhAmNo15ujq6mjGXPRBtZltR142kKE
20
- o1tUYtc4Fr3oIAh65m62ZC2kJ5GATLYQ+U3JiiHWga8iJ8KSHbrzhM4N3ppaeYxD
21
- wk6Lwk2OyppO9Iiv9Ad2BEFFd2s7mvYtaMGPWYK2fYTUuq6yKupg3CppX3ttq+bN
22
- Ejx6dXn4RwYmATfc/Iv4aVU8lZS9HABq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FAYmJd3fqKpb468yTIaL4bl4aUl2+xLdyK
33
+ fPI/ZWGy2uNjffzbrhJ+Ti6qAdubkJoMIqrfbrFV1ew2Bxkp/93etXVNjAgHNmu1
34
+ o3VAf3sbhnj33jAri7JYx/1MhAcJXlvpKxX9QnYouxU/RgzBF7oqcT0dJ2jWUnAI
35
+ spvOK5/LPXWX6ZGc2SR8SH/s7ftYH2EkeM1VUbtemow08NdgCwJ4IG+fRQ9dcrJ+
36
+ L9TbpLHvVrCe1w8duMqNeUmqj+M1iC/5Zst2vIe14QcOTuAh
37
37
  -----END CERTIFICATE-----
38
- date: 2020-04-29 00:00:00.000000000 Z
38
+ date: 2020-09-02 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: activesupport
@@ -139,14 +139,14 @@ dependencies:
139
139
  requirements:
140
140
  - - "~>"
141
141
  - !ruby/object:Gem::Version
142
- version: '3.6'
142
+ version: '4.0'
143
143
  type: :development
144
144
  prerelease: false
145
145
  version_requirements: !ruby/object:Gem::Requirement
146
146
  requirements:
147
147
  - - "~>"
148
148
  - !ruby/object:Gem::Version
149
- version: '3.6'
149
+ version: '4.0'
150
150
  - !ruby/object:Gem::Dependency
151
151
  name: sqlite3
152
152
  requirement: !ruby/object:Gem::Requirement
@@ -213,7 +213,7 @@ homepage: https://github.com/Eric-Guo/wechat
213
213
  licenses:
214
214
  - MIT
215
215
  metadata: {}
216
- post_install_message:
216
+ post_install_message:
217
217
  rdoc_options: []
218
218
  require_paths:
219
219
  - lib
@@ -221,15 +221,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
221
  requirements:
222
222
  - - "~>"
223
223
  - !ruby/object:Gem::Version
224
- version: '2.3'
224
+ version: '2.4'
225
225
  required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - ">="
228
228
  - !ruby/object:Gem::Version
229
229
  version: '0'
230
230
  requirements: []
231
- rubygems_version: 3.1.2
232
- signing_key:
231
+ rubygems_version: 3.1.4
232
+ signing_key:
233
233
  specification_version: 4
234
234
  summary: DSL for wechat message handling and API
235
235
  test_files: []
metadata.gz.sig CHANGED
Binary file