Class: Wechat::Core::Follower
- Inherits:
-
Object
- Object
- Wechat::Core::Follower
- Extended by:
- Common
- Defined in:
- lib/wechat/core/follower.rb
Overview
Follower 是关注者概要信息的远程调用封装类。
Constant Summary
Constants included from Common
Common::ERROR_CODES, Common::LANGUAGE_ENGLISH, Common::LANGUAGE_SIMPLIFIED_CHINESE, Common::LANGUAGE_TRANDITIONAL_CHINESE
Class Method Summary collapse
Methods included from Common
assert_present!, get_json, post_json
Class Method Details
.index(access_token, next_open_id: nil) ⇒ Object
获取关注者列表 mp.weixin.qq.com/wiki/0/d0e07720fc711c02a3eab6ec33054804.html
Return hash format if success: {
total: <TOTAL>,
count: <COUNT>,
data: { openid: [ <OPEN_ID_1>, <OPEN_ID_2>, ... ] },
next_openid: <NEXT_OPEN_ID>
}
19 20 21 22 23 24 25 26 27 |
# File 'lib/wechat/core/follower.rb', line 19 def self.index(access_token, next_open_id: nil) assert_present! :access_token, access_token = { access_token: access_token } [:next_openid] = next_open_id if next_open_id.present? get_json 'https://api.weixin.qq.com/cgi-bin/user/get', body: end |