wechat 1.0.1 → 1.1.0
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +4 -0
- data/README-CN.md +1 -1
- data/README.md +1 -1
- data/lib/action_controller/wechat_responder.rb +2 -0
- data/lib/wechat/concern/common.rb +7 -1
- data.tar.gz.sig +0 -0
- metadata +8 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d81118b4e78b92ca291b74b4040ac07d36c3c3bf5c433c583e247262a564598
|
|
4
|
+
data.tar.gz: 134affd462f41d996fa4cf30eb1787e3f682283ccf95b1eebd83b2ce63fdedd3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a73a0946f5e5451f731699f58c37133745a5403428cc74bccdd00006c0bff2ee935afc34d3bc4ac3f282c7fe3b59b21758b432e7d53d629adb3d6d94de3bc47a
|
|
7
|
+
data.tar.gz: 6a552e883d2218c46558c9f72eba7113c54f3019691c4c9874884244425958ede2487079f8ae671794bb5d5f0e2a8efd5ee4ba98afa6dcbc3cd9ce6f97bee20e
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
data/README-CN.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
WeChat [](https://rubygems.org/gems/wechat) [](https://mixtint.semaphoreci.com/projects/wechat)
|
|
1
|
+
WeChat [](https://rubygems.org/gems/wechat) [](https://mixtint.semaphoreci.com/projects/wechat)[](https://deepwiki.com/Eric-Guo/wechat)
|
|
2
2
|
======
|
|
3
3
|
|
|
4
4
|
[](https://gitter.im/Eric-Guo/wechat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
WeChat [](https://rubygems.org/gems/wechat) [](https://mixtint.semaphoreci.com/projects/wechat)
|
|
1
|
+
WeChat [](https://rubygems.org/gems/wechat) [](https://mixtint.semaphoreci.com/projects/wechat)[](https://deepwiki.com/Eric-Guo/wechat)
|
|
2
2
|
======
|
|
3
3
|
|
|
4
4
|
[](https://gitter.im/Eric-Guo/wechat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
@@ -4,6 +4,7 @@ module ActionController
|
|
|
4
4
|
module WechatResponder
|
|
5
5
|
def wechat_api(opts = {})
|
|
6
6
|
include Wechat::ControllerApi
|
|
7
|
+
|
|
7
8
|
account = opts.delete(:account)
|
|
8
9
|
self.wechat_cfg_account = account ? account.to_sym : :default
|
|
9
10
|
self.wechat_api_client = load_controller_wechat(wechat_cfg_account, opts)
|
|
@@ -11,6 +12,7 @@ module ActionController
|
|
|
11
12
|
|
|
12
13
|
def wechat_responder(opts = {})
|
|
13
14
|
include Wechat::Responder
|
|
15
|
+
|
|
14
16
|
account = opts.delete(:account)
|
|
15
17
|
self.account_from_request = opts.delete(:account_from_request)
|
|
16
18
|
self.wechat_cfg_account = account ? account.to_sym : :default
|
|
@@ -93,6 +93,12 @@ module Wechat
|
|
|
93
93
|
post 'business/getuserphonenumber', JSON.generate(code: code), base: Wechat::Api::WXA_BASE
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
def wxa_get_user_risk_rank(openid, scene, **payload)
|
|
97
|
+
# https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/sec-center/safety-control-capability/getUserRiskRank.html
|
|
98
|
+
request_body = { appid: access_token.appid, openid: openid, scene: scene }.merge(payload)
|
|
99
|
+
post 'getuserriskrank', JSON.generate(request_body), base: Wechat::Api::WXA_BASE
|
|
100
|
+
end
|
|
101
|
+
|
|
96
102
|
def wxa_get_wxacode(path, width = 430)
|
|
97
103
|
post 'getwxacode', JSON.generate(path: path, width: width), base: Wechat::Api::WXA_BASE
|
|
98
104
|
end
|
|
@@ -158,7 +164,7 @@ module Wechat
|
|
|
158
164
|
|
|
159
165
|
def material_add(type, file, opts = {})
|
|
160
166
|
params = { type: type }
|
|
161
|
-
params
|
|
167
|
+
params[:description] = opts.slice(:title, :introduction).to_json if type == 'video'
|
|
162
168
|
|
|
163
169
|
post_file 'material/add_material', file, params: params
|
|
164
170
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wechat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Skinnyworm
|
|
@@ -147,14 +147,14 @@ dependencies:
|
|
|
147
147
|
requirements:
|
|
148
148
|
- - "~>"
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: 1.
|
|
150
|
+
version: 1.81.7
|
|
151
151
|
type: :development
|
|
152
152
|
prerelease: false
|
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
|
155
155
|
- - "~>"
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
|
-
version: 1.
|
|
157
|
+
version: 1.81.7
|
|
158
158
|
- !ruby/object:Gem::Dependency
|
|
159
159
|
name: rails
|
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -175,14 +175,14 @@ dependencies:
|
|
|
175
175
|
requirements:
|
|
176
176
|
- - "~>"
|
|
177
177
|
- !ruby/object:Gem::Version
|
|
178
|
-
version: '
|
|
178
|
+
version: '8.0'
|
|
179
179
|
type: :development
|
|
180
180
|
prerelease: false
|
|
181
181
|
version_requirements: !ruby/object:Gem::Requirement
|
|
182
182
|
requirements:
|
|
183
183
|
- - "~>"
|
|
184
184
|
- !ruby/object:Gem::Version
|
|
185
|
-
version: '
|
|
185
|
+
version: '8.0'
|
|
186
186
|
- !ruby/object:Gem::Dependency
|
|
187
187
|
name: rspec-mocks
|
|
188
188
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -271,8 +271,8 @@ licenses:
|
|
|
271
271
|
metadata:
|
|
272
272
|
bug_tracker_uri: https://github.com/Eric-Guo/wechat/issues
|
|
273
273
|
changelog_uri: https://github.com/Eric-Guo/wechat/releases
|
|
274
|
-
documentation_uri: https://github.com/Eric-Guo/wechat/tree/v1.0
|
|
275
|
-
source_code_uri: https://github.com/Eric-Guo/wechat/tree/v1.0
|
|
274
|
+
documentation_uri: https://github.com/Eric-Guo/wechat/tree/v1.1.0#readme
|
|
275
|
+
source_code_uri: https://github.com/Eric-Guo/wechat/tree/v1.1.0
|
|
276
276
|
rubygems_mfa_required: 'true'
|
|
277
277
|
post_install_message: |2
|
|
278
278
|
|
|
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
291
291
|
- !ruby/object:Gem::Version
|
|
292
292
|
version: 3.1.6
|
|
293
293
|
requirements: []
|
|
294
|
-
rubygems_version: 3.
|
|
294
|
+
rubygems_version: 3.7.2
|
|
295
295
|
specification_version: 4
|
|
296
296
|
summary: DSL for wechat message handling and API
|
|
297
297
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|