Module: Lark::Apis::Chat
- Defined in:
- lib/lark/apis/chat.rb
Instance Method Summary collapse
- #chatter_add(chat_id:, user_ids: nil, open_ids: nil) ⇒ Object
- #chatter_delete(chat_id:, user_ids: nil, open_ids: nil) ⇒ Object
- #create(payload = {}) ⇒ Object
- #disband(chat_id) ⇒ Object
- #info(chat_id) ⇒ Object
- #list(page_size: nil, page_token: nil) ⇒ Object
- #members(user_access_token:, chat_id:, page_size: nil, page_token: nil) ⇒ Object
- #search(user_access_token:, query:, page_size: nil, page_token: nil) ⇒ Object
- #update(payload = {}) ⇒ Object
Instance Method Details
#chatter_add(chat_id:, user_ids: nil, open_ids: nil) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/lark/apis/chat.rb', line 45 def chatter_add(chat_id:, user_ids: nil, open_ids: nil) post 'chat/v4/chatter/add/', { chat_id: chat_id, user_ids: user_ids, open_ids: open_ids }.compact end |
#chatter_delete(chat_id:, user_ids: nil, open_ids: nil) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/lark/apis/chat.rb', line 53 def chatter_delete(chat_id:, user_ids: nil, open_ids: nil) post 'chat/v4/chatter/delete/', { chat_id: chat_id, user_ids: user_ids, open_ids: open_ids }.compact end |
#create(payload = {}) ⇒ Object
26 27 28 |
# File 'lib/lark/apis/chat.rb', line 26 def create(payload={}) post 'chat/v4/create/', payload end |
#disband(chat_id) ⇒ Object
61 62 63 |
# File 'lib/lark/apis/chat.rb', line 61 def disband(chat_id) post 'chat/v4/disband', {chat_id: chat_id} end |
#info(chat_id) ⇒ Object
37 38 39 |
# File 'lib/lark/apis/chat.rb', line 37 def info(chat_id) get 'chat/v4/info/', params: {chat_id: chat_id} end |
#list(page_size: nil, page_token: nil) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/lark/apis/chat.rb', line 30 def list(page_size: nil, page_token: nil) get 'chat/v4/list/', params: { page_size: page_size, page_token: page_token }.compact end |
#members(user_access_token:, chat_id:, page_size: nil, page_token: nil) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/lark/apis/chat.rb', line 4 def members(user_access_token:, chat_id:, page_size: nil, page_token: nil) get 'chat/v4/members', { access_token: user_access_token, params: { page_size: page_size, page_token: page_token } }.compact end |
#search(user_access_token:, query:, page_size: nil, page_token: nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/lark/apis/chat.rb', line 14 def search(user_access_token:, query:, page_size: nil, page_token: nil) get 'chat/v4/members', { access_token: user_access_token, params: { access_token: user_access_token, query: query, page_size: page_size, page_token: page_token } }.compact end |
#update(payload = {}) ⇒ Object
41 42 43 |
# File 'lib/lark/apis/chat.rb', line 41 def update(payload={}) post 'chat/v4/update/', payload end |