Sha256: 6fadfa55099b5bef6706f87539f01ecc84eefc54bc603850760766d3e3bd4927

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

##
# Follower 是关注者概要信息的远程调用封装类。

class Wechat::Core::Follower

  extend Wechat::Core::Common

  ##
  # 获取关注者列表
  # http://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>
  # }
  def self.index(access_token, next_open_id: nil)

    assert_present! :access_token, access_token

    options = { access_token: access_token }
    options[:next_openid] = next_open_id if next_open_id.present?

    get_json 'https://api.weixin.qq.com/cgi-bin/user/get', body: options
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wechat-core-1.1 lib/wechat/core/follower.rb
wechat-core-1.0 lib/wechat/core/follower.rb
wechat-core-0.4.2 lib/wechat/core/follower.rb