Module: WeixinAuthorize::Api::User

Included in:
Client
Defined in:
lib/weixin_authorize/api/user.rb

Instance Method Summary collapse

Instance Method Details

#followers(next_openid = "") ⇒ Object



16
17
18
19
# File 'lib/weixin_authorize/api/user.rb', line 16

def followers(next_openid="")
  followers_url = "#{user_base_url}/get"
  http_get(followers_url, {next_openid: next_openid})
end

#update_remark(openid, remark) ⇒ Object

设置备注名http请求方式: POST(请使用https协议)api.weixin.qq.com/cgi-bin/user/info/updateremark?access_token=ACCESS_TOKEN POST数据格式:JSON POST数据例子:

"openid":"oDF3iY9ffA-hqb2vVvbr7qxf6A0Q",
"remark":"pangzi"



30
31
32
33
34
35
36
37
# File 'lib/weixin_authorize/api/user.rb', line 30

def update_remark(openid, remark)
  update_url = "/user/info/updateremark"
  post_body = {
    openid: openid,
    remark: remark
  }
  http_post(update_url, post_body)
end

#user(openid, lang = "zh_CN") ⇒ Object



9
10
11
12
# File 'lib/weixin_authorize/api/user.rb', line 9

def user(openid, lang="zh_CN")
   = "#{user_base_url}/info"
  http_get(, {openid: openid, lang: lang})
end