module Lark::Apis::Contact

Public Instance Methods

department_add(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 8
def department_add(payload={})
  post 'contact/v1/department/add', payload
end
department_batch_add(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 12
def department_batch_add(payload={})
  post 'contact/v2/department/batch_add', payload
end
department_batch_get(department_ids=[]) click to toggle source
# File lib/lark/apis/contact.rb, line 41
def department_batch_get(department_ids=[])
  get 'contact/v1/department/detail/batch_get', params: {department_ids: department_ids}
end
department_children(department_id:, offset:, page_size:, fetch_child: false) click to toggle source
# File lib/lark/apis/contact.rb, line 28
def department_children(department_id:, offset:, page_size:, fetch_child: false)
  get 'contact/v1/department/simple/list', params: {
    department_id: department_id,
    offset: offset,
    page_size: page_size,
    fetch_child: fetch_child
  }.compact
end
department_children_ids(department_id) click to toggle source
# File lib/lark/apis/contact.rb, line 37
def department_children_ids(department_id)
  get 'contact/v1/department/list', params: {department_id: department_id}
end
department_delete(department_id) click to toggle source
# File lib/lark/apis/contact.rb, line 16
def department_delete(department_id)
  post 'contact/v1/department/delete', {id: department_id}
end
department_get(department_id) click to toggle source
# File lib/lark/apis/contact.rb, line 24
def department_get(department_id)
  get 'contact/v1/department/info/get', params: {department_id: department_id}
end
department_update(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 20
def department_update(payload={})
  post 'contact/v1/department/update', payload
end
department_user_detail_list(department_id:, offset: nil, page_token: nil, page_size:, fetch_child: false) click to toggle source
# File lib/lark/apis/contact.rb, line 55
def department_user_detail_list(department_id:, offset: nil, page_token: nil, page_size:, fetch_child: false)
  get 'contact/v1/department/user/detail/list', params: {
    department_id: department_id,
    offset: offset, # deprecation
    page_token: page_token,
    page_size: page_size,
    fetch_child: fetch_child
  }.compact
end
department_user_list(department_id:, offset: nil, page_token: nil, page_size:, fetch_child: false) click to toggle source
# File lib/lark/apis/contact.rb, line 45
def department_user_list(department_id:, offset: nil, page_token: nil, page_size:, fetch_child: false)
  get 'contact/v1/department/user/list', params: {
    department_id: department_id,
    offset: offset, # deprecation
    page_token: page_token,
    page_size: page_size,
    fetch_child: fetch_child
  }.compact
end
get_user_info(user_id, params={}) click to toggle source
# File lib/lark/apis/contact.rb, line 85
def get_user_info(user_id, params={})
  get "contact/v3/users/#{user_id}", params: params
end
role_list() click to toggle source
# File lib/lark/apis/contact.rb, line 101
def role_list
  get 'contact/v2/role/list'
end
role_members(role_id:, page_token: nil, page_size: nil) click to toggle source
# File lib/lark/apis/contact.rb, line 105
def role_members(role_id:, page_token: nil, page_size: nil)
  get 'contact/v2/role/members', params: {
    role_id: role_id,
    page_token: page_token,
    page_size: page_size
  }.compact
end
scope_get() click to toggle source
# File lib/lark/apis/contact.rb, line 4
def scope_get
  get 'contact/v1/scope/get'
end
task_get(task_id) click to toggle source
# File lib/lark/apis/contact.rb, line 93
def task_get(task_id)
  get 'contact/v2/task/get', params: {task_id: task_id}
end
tenant_custom_attr_get() click to toggle source
# File lib/lark/apis/contact.rb, line 89
def tenant_custom_attr_get
  get 'contact/v1/tenant/custom_attr/get'
end
user_add(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 65
def user_add(payload={})
  post 'contact/v1/user/add', payload
end
user_admin_scope_get(params) click to toggle source
# File lib/lark/apis/contact.rb, line 97
def user_admin_scope_get(params)
  get 'contact/v1/user/admin_scope/get', params: params
end
user_batch_add(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 69
def user_batch_add(payload={})
  post 'contact/v2/user/batch_add', payload
end
user_batch_get(params={}) click to toggle source
# File lib/lark/apis/contact.rb, line 81
def user_batch_get(params={})
  get 'contact/v1/user/batch_get', params: params
end
user_delete(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 73
def user_delete(payload={})
  post 'contact/v1/user/delete', payload
end
user_update(payload={}) click to toggle source
# File lib/lark/apis/contact.rb, line 77
def user_update(payload={})
  post 'contact/v1/user/update', payload
end