聊天室删除成员——批量

@param string $room_id
@param array $users

@return mixed
549509
public function roomDelUsers($room_id, $users)
    {
        $url          = $this->url.'chatrooms/'.$room_id.'/users/'.implode(',', $users);
        $option       = [];
        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'DELETE');
    }
1224791
public function roomCreate($room_name, $owner_name, $room_description = "描述", $max_user = 200, $member_users = [])
    {
        $url    = $this->url.'chatrooms';
        $option = [
            'name'        => $room_name,
            'description' => $room_description,
            'maxusers'    => $max_user,
            'owner'       => $owner_name,
        ];
        if ( ! empty($member_users)) {
            $option['members'] = $member_users;
        }
        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'POST');
    }
359695
public function get($room): array
    {
        return array_reduce((array) $room, function ($result, $value) {
            return array_merge($result, $this->redis->smembers($value));
        }, []);
    }
1046052
public function dismiss($roomId, $optParams = array())
  {
    $params = array('roomId' => $roomId);
    $params = array_merge($params, $optParams);
    return $this->call('dismiss', array($params));
  }
599840
public function createRoom(Room $room)
    {
        $response = $this->client->post("/v2/room", $room->toJson());

        return $response['id'];
    }
423307
func (gitter *Gitter) GetUsersInRoom(roomID string) ([]User, error) {
	var users []User
	response, err := gitter.get(gitter.config.apiBaseURL + "rooms/" + roomID + "/users")
	if err != nil {
		gitter.log(err)
		return nil, err
	}

	err = json.Unmarshal(response, &users)
	if err != nil {
		gitter.log(err)
		return nil, err
	}
	return users, nil
}
367883
def kick_user(self, user_id, reason=""):
        
        try:
            self.client.api.kick_user(self.room_id, user_id)
            return True
        except MatrixRequestError:
            return False
273966
public function leave($roomId, RoomLeaveRequest $postBody, $optParams = array()) {
      $params = array('roomId' => $roomId, 'postBody' => $postBody);
      $params = array_merge($params, $optParams);
      $data = $this->__call('leave', array($params));
      if ($this->useObjects()) {
        return new Room($data);
      } else {
        return $data;
      }
    }
1156811
public function DeleteReservation($roomId, $id, $accessToken = null)
    {
        return $this->provider->executeRequest("DELETE", "/room/{$roomId}/reservation/{$id}", $accessToken ?: $this->accessToken);
    }
523401
public function putMembers($id, array $members, $guestSpaceId = null): array
    {
        $options = ['json' => compact('id', 'members')];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->put(KintoneApi::generateUrl('space/members.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
274271
public function getUserList(array $user_list)
    {
        if (!is_array($user_list)) {
            $this->setError('参数必须为一个数组');

            return false;
        }

        $this->module = 'user';

        $res = $this->_post('info/batchget', $user_list);

        return $res;
    }
1165516
public function room_exists($room_id) {
    try {
      $this->get_room($room_id);
    }
    catch (HipChat_Exception $e) {
      if ($e->code === self::STATUS_NOT_FOUND) {
        return false;
      }
      throw $e;
    }
    return true;
  }
222368
def get_room_id(self, room_alias):
        
        content = self._send("GET", "/directory/room/{}".format(quote(room_alias)))
        return content.get("room_id", None)
162985
func (gitter *Gitter) GetUserRooms(userID string) ([]Room, error) {

	var rooms []Room
	response, err := gitter.get(gitter.config.apiBaseURL + "user/" + userID + "/rooms")
	if err != nil {
		gitter.log(err)
		return nil, err
	}

	err = json.Unmarshal(response, &rooms)
	if err != nil {
		gitter.log(err)
		return nil, err
	}

	return rooms, nil
}
206607
def join(room)
      room_object = find_room(room)

      if room_object
        redis.sadd("persisted_rooms", room_object.id)
        adapter.join(room_object.id)
      else
        adapter.join(room)
      end
    end
971780
function( userId ) {

		return this.memory.createRoom( userId )
			   .then( function( id ) {

			   		rooms[ id ] = room( this.memory, id );
			   			
						return promise.resolve( rooms[ id ] );
			   }.bind( this ), function() {

			   		return promise.reject( 'could not get a roomID to create a room' );
			   });
	}
390619
public ParticipantEntities getChatRoomParticipants(String roomName) {
		return restClient.get("chatrooms/" + roomName + "/participants", ParticipantEntities.class,
				new HashMap<String, String>());
	}