Module: Lark::Apis::Contact
- Defined in:
- lib/lark/apis/contact.rb
Instance Method Summary collapse
- #department_add(payload = {}) ⇒ Object
- #department_batch_add(payload = {}) ⇒ Object
- #department_batch_get(department_ids = []) ⇒ Object
- #department_children(department_id:, offset:, page_size:, fetch_child: false) ⇒ Object
- #department_children_ids(department_id) ⇒ Object
- #department_delete(department_id) ⇒ Object
- #department_get(department_id) ⇒ Object
- #department_update(payload = {}) ⇒ Object
- #department_user_detail_list(department_id:, offset: nil, page_token: nil, page_size:, fetch_child: false) ⇒ Object
- #department_user_list(department_id:, offset: nil, page_token: nil, page_size:, fetch_child: false) ⇒ Object
- #get_user_info(user_id, params = {}) ⇒ Object
- #role_list ⇒ Object
- #role_members(role_id:, page_token: nil, page_size: nil) ⇒ Object
- #scope_get ⇒ Object
- #task_get(task_id) ⇒ Object
- #tenant_custom_attr_get ⇒ Object
- #user_add(payload = {}) ⇒ Object
- #user_admin_scope_get(params) ⇒ Object
- #user_batch_add(payload = {}) ⇒ Object
- #user_batch_get(params = {}) ⇒ Object
- #user_delete(payload = {}) ⇒ Object
- #user_update(payload = {}) ⇒ Object
Instance Method Details
#department_add(payload = {}) ⇒ Object
8 9 10 |
# File 'lib/lark/apis/contact.rb', line 8 def department_add(payload={}) post 'contact/v1/department/add', payload end |
#department_batch_add(payload = {}) ⇒ Object
12 13 14 |
# 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 = []) ⇒ Object
41 42 43 |
# 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) ⇒ Object
28 29 30 31 32 33 34 35 |
# 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) ⇒ Object
37 38 39 |
# 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) ⇒ Object
16 17 18 |
# 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) ⇒ Object
24 25 26 |
# 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 = {}) ⇒ Object
20 21 22 |
# 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) ⇒ Object
55 56 57 58 59 60 61 62 63 |
# 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) ⇒ Object
45 46 47 48 49 50 51 52 53 |
# 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 = {}) ⇒ Object
85 86 87 |
# 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 ⇒ Object
101 102 103 |
# 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) ⇒ Object
105 106 107 108 109 110 111 |
# 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 ⇒ Object
4 5 6 |
# File 'lib/lark/apis/contact.rb', line 4 def scope_get get 'contact/v1/scope/get' end |
#task_get(task_id) ⇒ Object
93 94 95 |
# 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 ⇒ Object
89 90 91 |
# File 'lib/lark/apis/contact.rb', line 89 def tenant_custom_attr_get get 'contact/v1/tenant/custom_attr/get' end |
#user_add(payload = {}) ⇒ Object
65 66 67 |
# File 'lib/lark/apis/contact.rb', line 65 def user_add(payload={}) post 'contact/v1/user/add', payload end |
#user_admin_scope_get(params) ⇒ Object
97 98 99 |
# 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 = {}) ⇒ Object
69 70 71 |
# 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 = {}) ⇒ Object
81 82 83 |
# 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 = {}) ⇒ Object
73 74 75 |
# File 'lib/lark/apis/contact.rb', line 73 def user_delete(payload={}) post 'contact/v1/user/delete', payload end |
#user_update(payload = {}) ⇒ Object
77 78 79 |
# File 'lib/lark/apis/contact.rb', line 77 def user_update(payload={}) post 'contact/v1/user/update', payload end |