class Kf5Api::User
Constants
- ACTIONS_HASH
Public Class Methods
edit(id, attributes = {})
click to toggle source
修改用户信息
# File lib/kf5_api/user.rb, line 28 def edit(id, attributes = {}) action = format(ACTIONS_HASH[:edit], id: id) put(action, attributes).parsed_response end
search(keyword, query_fields = nil)
click to toggle source
查询用户信息 query为查询参数,模糊搜索(名称,邮箱,手机号,微信openid)
# File lib/kf5_api/user.rb, line 35 def search(keyword, query_fields = nil) action = format(ACTIONS_HASH[:search]) query_params = { query: keyword } query_params[:query_fields] = query_fields if query_fields.present? get(action, query_params).parsed_response end
users(query_params = {})
click to toggle source
获取用户列表
# File lib/kf5_api/user.rb, line 16 def users(query_params = {}) action = ACTIONS_HASH[:users] get(action, query_params).parsed_response end
users_by_organization(org_id, query_params = {})
click to toggle source
获取某个组织下的所有用户
# File lib/kf5_api/user.rb, line 22 def users_by_organization(org_id, query_params = {}) action = format(ACTIONS_HASH[:users_by_org], id: org_id) get(action, query_params).parsed_response end