Add members to chat room

@param roomId  chat room id
@param members {@link Members}
@return No content
@throws APIConnectionException connect exception
@throws APIRequestException    request exception
558479
public ResponseWrapper addChatRoomMember(long roomId, Members members)
            throws APIConnectionException, APIRequestException {
        Preconditions.checkArgument(roomId > 0, "room id is invalid");
        Preconditions.checkArgument(members != null, "members should not be empty");
        return _httpClient.sendPut(_baseUrl + mChatRoomPath + "/" + roomId + "/members", members.toString());
    }
588019
private List<MemberState> assignMembers(int index, List<MemberState> sortedMembers) {
    List<MemberState> members = new ArrayList<>(sortedMembers.size());
    for (int i = 0; i < sortedMembers.size(); i++) {
      if ((i + 1) % index == 0) {
        members.add(sortedMembers.get(i));
      }
    }
    return members;
  }
833738
function( userID, roomID ) {

		var userCount;

		if( roomUsers[ roomID ] === undefined ) {

			return promise.reject( 'No room with the id: ' + roomID );
		} else {

			var userIDX = roomUsers[ roomID ].indexOf( userID );

			if( userIDX != -1 ) {

				roomUsers[ roomID ].splice( userIDX, 1 );

				userCount = roomUsers[ roomID ].length;

				if( userCount == 0 ) {

					delete roomUsers[ roomID ];
				}

				return promise.resolve( userCount );
			} else {

				return promise.reject( 'User ' + userID + ' is not in the room: ' + roomID );
			}
		}
	}
238100
def channels_set_join_code(self, room_id, join_code, **kwargs):
        """"""
        return self.__call_api_post('channels.setJoinCode', roomId=room_id, joinCode=join_code, kwargs=kwargs)
756076
public long addAll(final String... members) {
        return doWithJedis(new JedisCallable<Long>() {
            @Override
            public Long call(Jedis jedis) {
                return jedis.sadd(getKey(), members);
            }
        });
    }
871665
function( userID ) {

		var id = curId;

		curId++;

		if( curId == Number.MAX_VALUE )
			curId = Number.MIN_VALUE;

		roomUsers[ id ] = [];

		return this.setRoomData( id, {} )
			   .then( this.joinRoom.bind( this, userID, id ) )
			   .then( function() {

			   		return id;
			   });
	}
1007159
public Membership add(Address new_member) {
        synchronized(members) {
            if(new_member != null && !members.contains(new_member)) {
                members.add(new_member);
            }
        }
        return this;
    }
408070
def join(self, room_str):
        """"""
        response = self.user_api.join_room(room_str)
        return self._mkroom(response["room_id"])
459187
public ChatRoomMemberList getChatRoomMembers(long roomId, int start, int count)
            throws APIConnectionException, APIRequestException {
        Preconditions.checkArgument(roomId > 0, "room id is invalid");
        Preconditions.checkArgument(start >= 0 && count > 0, "Illegal argument");
        ResponseWrapper responseWrapper = _httpClient.sendGet(_baseUrl + mChatRoomPath + "/" + roomId + "/members"
                + "?start=" + start + "&count=" + count);
        return ChatRoomMemberList.fromResponse(responseWrapper, ChatRoomMemberList.class);
    }
104586
public boolean add(final String member, final double score) {
        return doWithJedis(new JedisCallable<Boolean>() {
            @Override
            public Boolean call(Jedis jedis) {
                return jedis.zadd(getKey(), score, member) > 0;
            }
        });
    }
804225
def ib_group_member_add(self, group_id, userids):
        '''  '''
        req_hook = 'pod/v1/admin/group/' + group_id + '/membership/add'
        req_args = {'usersListId': userids}
        req_args = json.dumps(req_args)
        status_code, response = self.__rest__.POST_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
1162305
public function join($roomId, RoomJoinRequest $postBody, $optParams = array()) {
      $params = array('roomId' => $roomId, 'postBody' => $postBody);
      $params = array_merge($params, $optParams);
      $data = $this->__call('join', array($params));
      if ($this->useObjects()) {
        return new Room($data);
      } else {
        return $data;
      }
    }
24164
def channels_add_all(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('channels.addAll', roomId=room_id, kwargs=kwargs)
266143
public Response addOutcast(String roomName, String jid) {
		return restClient.post("chatrooms/" + roomName + "/outcasts/" + jid, null, new HashMap<String, String>());
	}
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();
    }
751203
public function add(int $fd, $rooms)
    {
        $rooms = is_array($rooms) ? $rooms : [$rooms];

        $this->addValue($fd, $rooms, RoomContract::DESCRIPTORS_KEY);

        foreach ($rooms as $room) {
            $this->addValue($room, [$fd], RoomContract::ROOMS_KEY);
        }
    }
1071155
public boolean addMember(Principal principal)
   {
       if(groupMembers.contains(principal))
           return false;

       groupMembers.add(principal);
       return true;
   }