Module: ChatWork::Client::MemberMethods
- Included in:
- ChatWork::Client
- Defined in:
- lib/chatwork/client/member_methods.rb
Instance Method Summary collapse
-
#get_members(room_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of all chat members associated with the specified chat.
-
#update_all_members(room_id:, members_admin_ids:, members_member_ids: nil, members_readonly_ids: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change associated members of group chat at once.
Instance Method Details
#get_members(room_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of all chat members associated with the specified chat
28 29 30 |
# File 'lib/chatwork/client/member_methods.rb', line 28 def get_members(room_id:, &block) get("/rooms/#{room_id}/members", &block) end |
#update_all_members(room_id:, members_admin_ids:, members_member_ids: nil, members_readonly_ids: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change associated members of group chat at once
55 56 57 58 59 60 61 62 63 |
# File 'lib/chatwork/client/member_methods.rb', line 55 def update_all_members(room_id:, members_admin_ids:, members_member_ids: nil, members_readonly_ids: nil, &block) params = { members_admin_ids: Array(members_admin_ids).join(","), } params[:members_member_ids] = Array(members_member_ids).join(",") if members_member_ids params[:members_readonly_ids] = Array(members_readonly_ids).join(",") if members_readonly_ids put("/rooms/#{room_id}/members", params, &block) end |